run precalculation via action puntton with quer:work, send mail when finished
This commit is contained in:
1 parent
7fc0e2e029
commit
5503dc7ba0
2 files changed
+280
-137
No files matched your search
+1
-6
@@ -10,7 +10,6 @@ use Filament\Actions\CreateAction;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class ListStatistikoImports extends ListRecords
|
||||
@@ -25,12 +24,8 @@ class ListStatistikoImports extends ListRecords
|
||||
->requiresConfirmation() // Optional: Asks user before running
|
||||
->action(function () {
|
||||
// Run the console command
|
||||
/** @var User|null $user */
|
||||
$user = Auth::user();
|
||||
|
||||
Artisan::queue('update:player', [
|
||||
'--userId' => $user->id(),
|
||||
]);
|
||||
Artisan::queue('update:player');
|
||||
|
||||
// Notify the user of success
|
||||
Notification::make()
|
||||
|
||||
Reference in new issue
Block a user