update
This commit is contained in:
parent
06bb4ab096
commit
6a4c37fd77
3 changed files with 36 additions and 2 deletions
|
@ -21,6 +21,8 @@ class ModelWebsiteCreatingListener
|
|||
*/
|
||||
public function handle(ModelWebsiteCreating $event): void
|
||||
{
|
||||
//
|
||||
|
||||
dd($event);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
26
web/app/Listeners/ModelWebsiteDeletingListener.php
Normal file
26
web/app/Listeners/ModelWebsiteDeletingListener.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Listeners;
|
||||
|
||||
use App\Events\ModelWebsiteDeleting;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
|
||||
class ModelWebsiteDeletingListener
|
||||
{
|
||||
/**
|
||||
* Create the event listener.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*/
|
||||
public function handle(ModelWebsiteDeleting $event): void
|
||||
{
|
||||
// dd($event);
|
||||
}
|
||||
}
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Events\ModelWebsiteCreating;
|
||||
use App\Events\ModelWebsiteDeleting;
|
||||
use App\Listeners\ModelWebsiteCreatingListener;
|
||||
use App\Listeners\ModelWebsiteDeletingListener;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
|
@ -19,6 +24,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
Event::listen(ModelWebsiteCreating::class,ModelWebsiteCreatingListener::class);
|
||||
Event::listen(ModelWebsiteDeleting::class,ModelWebsiteDeletingListener::class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue