phpvms/app/Providers/EventServiceProvider.php

50 lines
1.1 KiB
PHP
Raw Normal View History

2017-06-09 02:28:26 +08:00
<?php
namespace App\Providers;
use App\Events\CronMonthly;
use App\Events\CronNightly;
use App\Events\CronWeekly;
use App\Events\Expenses;
use App\Events\UserStatsChanged;
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;
use App\Listeners\ExpenseListener;
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 = [
Expenses::class => [
ExpenseListener::class
],
# Cron hooks
CronNightly::class => [
ApplyExpenses::class,
RecalculateBalances::class,
PilotLeave::class,
],
CronWeekly::class => [
],
CronMonthly::class => [
2018-04-07 06:14:01 +08:00
\App\Cron\Monthly\ApplyExpenses::class
],
UserStatsChanged::class => [
AwardListener::class,
],
2017-06-09 02:28:26 +08:00
];
protected $subscribe = [
FinanceEvents::class,
NotificationEvents::class,
];
2017-06-09 02:28:26 +08:00
}