php - Registering Application Events in Laravel 5 -
i have website made laravel 4.2 , want upgrade larave 5.x. tried upgrading , can't seem make work completly. problem using app::before , app::after events in laravel 4.2 (for setting cookies) , see have been removed in laravel 5.x. missing or have find new way how on other way in laravel 5.x? tried placing old code filters.php new filters.php , other places no luck. thanks
you can use middleware purpose instead.
- create middleware.
- make trigger before or after page load following instructions under "before / after middleware" header in documentation: https://laravel.com/docs/5.2/middleware
- add global array in
app/http/kernel.php
- that's 1 called$middleware
Comments
Post a Comment