12.4 Laravel Events
Here are the events that can be found inside the Laravel core. Normally you won’t have to
interact with these, but once you have become a Laravel Guru you may feel the need to bend
the framework to your will. Using these events is one such example of doing so.1 <?php
2
3 Event::listen('laravel.log', function($type, $message){});
A new laravel log entry has been created.
1 <?php
2
3 Event::listen('laravel.query', function($sql, $bindings, $time){});
An SQL query has been performed.
1 <?php
2
3 Event::listen('laravel.done', function($response){});
Laravel’s work is done, and the response is ready to be sent.
1 <?php
2
3 Event::listen('404', function(){});
A page could not be found.
and many more.
Note: It is best to prefix your event with the application name to avoid conflicts
with other events. This is why all Laravel events start with laravel..
Rohin Bansal
Skills Laravel
Qualifications :-Location :-Dehradun,Dehradun,Uttrakhand,India
Description:-
Explore