phpvms/app/Providers/EventServiceProvider.php
2018-03-17 00:55:39 -05:00

54 lines
1.2 KiB
PHP
Executable File

<?php
namespace App\Providers;
use App\Events\CronMonthly;
use App\Events\CronNightly;
use App\Events\CronWeekly;
use App\Events\Expenses;
use App\Events\UserStateChanged;
use App\Listeners\AwardListener;
use App\Listeners\Cron\Nightly\RecalculateBalances;
use App\Listeners\ExpenseListener;
use App\Listeners\FinanceEvents;
use App\Listeners\NotificationEvents;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
Expenses::class => [
ExpenseListener::class
],
# Cron hooks
CronNightly::class => [
\App\Listeners\Cron\Nightly\ApplyExpenses::class,
RecalculateBalances::class,
],
CronWeekly::class => [
],
CronMonthly::class => [
\App\Listeners\Cron\Monthly\ApplyExpenses::class
],
UserStateChanged::class => [
AwardListener::class,
],
];
protected $subscribe = [
FinanceEvents::class,
NotificationEvents::class,
];
}