mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
77 lines
2.1 KiB
PHP
77 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\MasterTaskEdited;
|
|
use App\Events\SubTaskCreated;
|
|
use App\Events\SubTaskDeleted;
|
|
use App\Events\SubTaskEdited;
|
|
use App\Events\TimeBlockFinished;
|
|
use App\Listeners\SendDeletedSubTaskNotification;
|
|
use App\Listeners\SendEditedMasterTaskNotification;
|
|
use App\Listeners\SendEditedSubTaskNotification;
|
|
use App\Listeners\SendFinishedTimeBlockNotification;
|
|
use App\Listeners\SendNewSubTaskEmailNotification;
|
|
use App\Models\MasterTask;
|
|
use App\Models\SubTask;
|
|
use App\Models\Timeblock;
|
|
use App\Observers\MasterTaskObserver;
|
|
use App\Observers\SubTaskObserver;
|
|
use App\Observers\TimeBlockObserver;
|
|
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 => [
|
|
SendNewSubTaskEmailNotification::class,
|
|
//LogEvent::class,
|
|
],
|
|
SubTaskDeleted::class => [
|
|
SendDeletedSubTaskNotification::class
|
|
],
|
|
SubTaskEdited::class => [
|
|
SendEditedSubTaskNotification::class
|
|
],
|
|
MasterTaskEdited::class => [
|
|
SendEditedMasterTaskNotification::class
|
|
],
|
|
TimeBlockFinished::class => [
|
|
SendFinishedTimeBlockNotification::class
|
|
],
|
|
];
|
|
|
|
/**
|
|
* Register any events for your application.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
MasterTask::observe( MasterTaskObserver::class);
|
|
SubTask::observe( SubTaskObserver::class);
|
|
Timeblock::observe( TimeBlockObserver::class);
|
|
}
|
|
|
|
/**
|
|
* Determine if events and listeners should be automatically discovered.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function shouldDiscoverEvents()
|
|
{
|
|
return false;
|
|
}
|
|
}
|