30 lines
594 B
PHP
30 lines
594 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\PostCreated;
|
|
use App\Events\PostUpdated;
|
|
use App\Listeners\ClearPostCache;
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
|
|
class EventServiceProvider extends ServiceProvider
|
|
{
|
|
protected $listen = [
|
|
PostCreated::class => [
|
|
ClearPostCache::class,
|
|
],
|
|
PostUpdated::class => [
|
|
ClearPostCache::class,
|
|
],
|
|
];
|
|
|
|
public function boot(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
public function shouldDiscoverEvents(): bool
|
|
{
|
|
return false;
|
|
}
|
|
}
|