mirror of
https://github.com/henry4682/finance_app.git
synced 2026-07-16 08:20:00 +00:00
24 lines
612 B
PHP
24 lines
612 B
PHP
<?php
|
||
|
||
namespace App\Console\Commands;
|
||
|
||
use Illuminate\Console\Command;
|
||
use App\Models\User;
|
||
use Google\Client as GoogleClient;
|
||
|
||
use App\Jobs\FetchAndParseGmailInvoices;
|
||
|
||
class DebugGmailJob extends Command
|
||
{
|
||
protected $signature = 'gmail:debug-job';
|
||
protected $description = '繞過Job快取,直接在終端機打印最新未讀信件';
|
||
|
||
public function handle()
|
||
{
|
||
$this->info("🔄 正在讀取 User ID 1 的 Google 憑證...");
|
||
$user = User::find(1);
|
||
|
||
app(FetchAndParseGmailInvoices::class, ['user' => $user])->handle(new \App\Services\GmailParserService());
|
||
}
|
||
}
|