2018-08-20 22:42:54 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
use App\Cron\Nightly\RecalculateStats;
|
|
|
|
use App\Cron\Nightly\SetActiveFlights;
|
|
|
|
use App\Events\CronMonthly;
|
|
|
|
use App\Events\CronNightly;
|
|
|
|
use App\Events\CronWeekly;
|
|
|
|
use App\Cron\Nightly\ApplyExpenses;
|
|
|
|
use App\Cron\Nightly\PilotLeave;
|
|
|
|
use App\Cron\Nightly\RecalculateBalances;
|
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
|
2018-08-20 22:48:39 +08:00
|
|
|
/**
|
|
|
|
* All of the hooks for the cron jobs
|
|
|
|
* @package App\Providers
|
|
|
|
*/
|
2018-08-20 22:42:54 +08:00
|
|
|
class CronServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
protected $listen = [
|
|
|
|
CronNightly::class => [
|
|
|
|
ApplyExpenses::class,
|
|
|
|
RecalculateBalances::class,
|
|
|
|
PilotLeave::class,
|
|
|
|
SetActiveFlights::class,
|
|
|
|
RecalculateStats::class,
|
|
|
|
],
|
|
|
|
|
|
|
|
CronWeekly::class => [
|
|
|
|
],
|
|
|
|
|
|
|
|
CronMonthly::class => [
|
|
|
|
\App\Cron\Monthly\ApplyExpenses::class
|
|
|
|
],
|
|
|
|
];
|
|
|
|
}
|