2017-06-09 02:28:26 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2018-04-13 05:12:32 +08:00
|
|
|
use App\Cron\Nightly\SetActiveFlights;
|
2018-03-17 09:12:56 +08:00
|
|
|
use App\Events\CronMonthly;
|
|
|
|
use App\Events\CronNightly;
|
|
|
|
use App\Events\CronWeekly;
|
|
|
|
use App\Events\Expenses;
|
2018-03-18 01:55:50 +08:00
|
|
|
use App\Events\UserStatsChanged;
|
2018-03-17 13:55:39 +08:00
|
|
|
use App\Listeners\AwardListener;
|
2018-04-07 06:14:01 +08:00
|
|
|
use App\Cron\Nightly\ApplyExpenses;
|
|
|
|
use App\Cron\Nightly\PilotLeave;
|
|
|
|
use App\Cron\Nightly\RecalculateBalances;
|
2018-03-17 09:12:56 +08:00
|
|
|
use App\Listeners\ExpenseListener;
|
2018-03-02 06:20:13 +08:00
|
|
|
use App\Listeners\FinanceEvents;
|
|
|
|
use App\Listeners\NotificationEvents;
|
2018-02-21 12:33:09 +08:00
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
2017-06-09 02:28:26 +08:00
|
|
|
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
protected $listen = [
|
2018-03-17 13:55:39 +08:00
|
|
|
|
2018-03-20 09:50:40 +08:00
|
|
|
Expenses::class => [
|
2018-03-02 06:20:13 +08:00
|
|
|
ExpenseListener::class
|
|
|
|
],
|
2018-03-17 09:12:56 +08:00
|
|
|
|
|
|
|
# Cron hooks
|
|
|
|
CronNightly::class => [
|
2018-03-31 11:28:19 +08:00
|
|
|
ApplyExpenses::class,
|
2018-03-17 09:12:56 +08:00
|
|
|
RecalculateBalances::class,
|
2018-03-31 11:28:19 +08:00
|
|
|
PilotLeave::class,
|
2018-04-13 05:12:32 +08:00
|
|
|
SetActiveFlights::class,
|
2018-03-17 09:12:56 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
CronWeekly::class => [
|
|
|
|
],
|
|
|
|
|
|
|
|
CronMonthly::class => [
|
2018-04-07 06:14:01 +08:00
|
|
|
\App\Cron\Monthly\ApplyExpenses::class
|
2018-03-17 09:12:56 +08:00
|
|
|
],
|
2018-03-17 13:55:39 +08:00
|
|
|
|
2018-03-18 01:55:50 +08:00
|
|
|
UserStatsChanged::class => [
|
2018-03-17 13:55:39 +08:00
|
|
|
AwardListener::class,
|
|
|
|
],
|
2017-06-09 02:28:26 +08:00
|
|
|
];
|
2018-04-13 05:12:32 +08:00
|
|
|
|
2017-12-23 02:00:57 +08:00
|
|
|
protected $subscribe = [
|
2018-03-02 06:20:13 +08:00
|
|
|
FinanceEvents::class,
|
|
|
|
NotificationEvents::class,
|
2017-12-23 02:00:57 +08:00
|
|
|
];
|
2017-06-09 02:28:26 +08:00
|
|
|
}
|