add missing listener files

This commit is contained in:
Nabeel Shahzad
2017-12-02 10:26:25 -06:00
parent 78cd6d3328
commit 68039f6a5a
8 changed files with 50 additions and 12 deletions

View File

@@ -0,0 +1,16 @@
<?php
namespace Modules\Sample\Listeners;
use App\Events\TestEvent;
use Log;
class TestEventListener
{
/**
* Handle the event.
*/
public function handle(TestEvent $event) {
Log::info('Received event', [$event]);
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace Modules\Sample\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*/
protected $listen = [
'App\Events\TestEvent' => [
'Modules\Sample\Listeners\TestEventListener',
],
];
/**
* Register any events for your application.
*/
public function boot()
{
parent::boot();
}
}