feat: 前端分離+功能api化

1. 新增資產管理CRUD、googleOAuth登入
2. 更改原記帳controller
This commit is contained in:
2026-06-25 14:19:07 +08:00
parent 7bb931c97b
commit 85972f950c
70 changed files with 4754 additions and 1520 deletions

View File

@@ -1,8 +1,30 @@
<?php
use App\Console\Commands\RefreshAllAssetPrices;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schedule;
use App\Jobs\FetchAndParseGmailInvoices;
use App\Models\User;
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');
Schedule::command(RefreshAllAssetPrices::class)
->weekdays()
->at('14:00')
->at('22:00');
Schedule::call(function () {
// 找出所有有綁定 Google Refresh Token 的使用者
$users = User::whereNotNull('google_refresh_token')->get();
foreach ($users as $user) {
// 分別派發非同步任務去排隊抓信,不塞車
FetchAndParseGmailInvoices::dispatch($user);
}
})
->weekdays()
->at('14:00')
->at('22:00');