php - Laravel 5 Post-login actions/hooks -
in laravel 5, want add custom user-specific data session variable after user has logged in. understand there may way overriding postlogin() in authentication controller, think there may way using middleware?
however, not sure place middleware executed straight after authentication has succeeded.
you can place in middleware/redirectifauthenticated.php
if ($this->auth->check()) { //place code here return new redirectresponse(url('/home')); }
Comments
Post a Comment