Files
sam-api/app/Console/Kernel.php

33 lines
964 B
PHP
Raw Normal View History

<?php
namespace App\Console;
use App\Console\Commands\GenerateSimpleRelationships;
use App\Console\Commands\MakeModelWithRelationships;
use App\Console\Commands\PruneAuditLogs;
use App\Console\Commands\UpdateLogicalRelationships;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
protected $commands = [
PruneAuditLogs::class,
UpdateLogicalRelationships::class,
MakeModelWithRelationships::class,
GenerateSimpleRelationships::class,
];
protected function schedule(Schedule $schedule): void
{
// 매일 새벽 03:10에 감사 로그 정리(환경값 기반 보관기간)
$schedule->command('audit:prune')->dailyAt('03:10');
}
protected function commands(): void
{
// 라우트 콘솔 혹은 커맨드 자동 로딩 필요 시 사용
// $this->load(__DIR__.'/Commands');
}
}