mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
59 lines
1.5 KiB
PHP
59 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\MasterTaskEdited;
|
|
use App\Events\SubTaskCreated;
|
|
use App\Listeners\SendEditedMasterTaskNotification;
|
|
use App\Listeners\SendNewTaskEmailNotification;
|
|
use App\Models\MasterTask;
|
|
use App\Models\SubTask;
|
|
use App\Observers\MasterTaskObserver;
|
|
use App\Observers\SubTaskObserver;
|
|
use Illuminate\Auth\Events\Registered;
|
|
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
use Illuminate\Support\Facades\Event;
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* The event to listener mappings for the application.
|
|
*
|
|
* @var array<class-string, array<int, class-string>>
|
|
*/
|
|
protected $listen = [
|
|
Registered::class => [
|
|
SendEmailVerificationNotification::class,
|
|
],
|
|
SubTaskCreated::class => [
|
|
SendNewTaskEmailNotification::class,
|
|
//LogEvent::class,
|
|
],
|
|
MasterTaskEdited::class => [
|
|
SendEditedMasterTaskNotification::class
|
|
],
|
|
];
|
|
|
|
/**
|
|
* Register any events for your application.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
MasterTask::observe( MasterTaskObserver::class);
|
|
SubTask::observe( SubTaskObserver::class);
|
|
}
|
|
|
|
/**
|
|
* Determine if events and listeners should be automatically discovered.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function shouldDiscoverEvents()
|
|
{
|
|
return false;
|
|
}
|
|
}
|