By Default, Laravel eloquent model fires following events : 'creating', 'created', 'updating', 'updated', 'deleting', 'deleted', 'saving', 'saved', 'restoring', 'restored'
I am using listing for eloquent events using wildcard listener in my AppServiceProvider
Like this :
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
\Event::listen(['eloquent.*'], function ($a){
var_dump($a);
});
}
I am getting nothing when I dump $a
.
I know we can capture event with observable. Is there other ways to do this?
via Pankit Gami