Skip to content

Instantly share code, notes, and snippets.

@mgsmus
Created December 30, 2019 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgsmus/bba6dd4232e2ebfb95efbd6163b5251f to your computer and use it in GitHub Desktop.
Save mgsmus/bba6dd4232e2ebfb95efbd6163b5251f to your computer and use it in GitHub Desktop.
<?php
namespace Mgsmus\MyPackage\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
class MyPackageEventServiceProvider extends EventServiceProvider
{
protected $listen = [
\Mgsmus\MyPackage\Events\EntityCreated::class => [
\Mgsmus\MyPackage\Listeners\DoSomethingAboutEntity::class,
\Mgsmus\MyPackage\Listeners\SendNotificationAboutEntity::class
]
];
/**
* Register any events for your application.
*/
public function boot(): void
{
parent::boot();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment