This commit is contained in:
2026-08-01 22:54:56 +07:00
parent 36eec0a664
commit 4255d187c9
5 changed files with 16 additions and 9 deletions
+3 -3
View File
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
use App\Services\Admin\Contracts\AdminServiceInterface;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class ResetCardsCommand extends Command
{
@@ -21,10 +22,9 @@ class ResetCardsCommand extends Command
{
try {
$this->adminService->resetAllCards();
$this->info('Successfully reset all cards for active members to 0!');
Log::info('Successfully reset all cards for active members to 0!');
} catch (\Throwable $e) {
\Illuminate\Support\Facades\Log::error('Lỗi xảy ra khi chạy command reset thẻ hàng tháng (cards:reset): ' . $e->getMessage());
$this->error('Reset cards failed: ' . $e->getMessage());
Log::error('Error occurred while executing monthly card reset command (cards:reset): ' . $e->getMessage());
return Command::FAILURE;
}