Files
ntspi-app/app/Ship/Kernels/ConsoleKernel.php
T
F4ilji 1853b087f4 chore: update seeders, add MockDataSeeder and AssignAllPermissions command
- DatabaseSeeder: replace old seeders with MockDataSeeder
- RolesSeeder: update role definitions
- Add AssignAllPermissions artisan command
- Register MockDataSeeder in AppServiceProvider
- Register command in ConsoleKernel
2026-09-18 01:39:28 +05:00

54 lines
1.5 KiB
PHP
Executable File

<?php
namespace App\Ship\Kernels;
use AlxDorosenco\PortoForLaravel\Loaders\CommandsLoader;
use AlxDorosenco\PortoForLaravel\Loaders\RoutesLoader;
use App\Containers\Dashboard\Commands\FetchEmailNewsCommand;
use App\Ship\Commands\AssignAllPermissions;
use App\Ship\Commands\InitRoles;
use App\Ship\Commands\SyncDashboardPermissions;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as LaravelConsoleKernel;
class ConsoleKernel extends LaravelConsoleKernel
{
use CommandsLoader;
use RoutesLoader;
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('sitemap:generate')->dailyAt('03:00');
// Получение новостей из Email каждые 5 минут
$schedule->command(FetchEmailNewsCommand::class)
->everyFiveMinutes()
->withoutOverlapping()
->onOneServer();
}
protected $commands = [
AssignAllPermissions::class,
InitRoles::class,
FetchEmailNewsCommand::class,
SyncDashboardPermissions::class,
];
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->loadCommandsForConsoleKernel();
$this->loadRoutesForConsoleKernel();
}
}