vendredi 30 juin 2017

Get User in Laravel 5.4 Controller constructor

I have Laravel 5.4 Base Controller which should share along children Controllers some common data depending on current Authenticated user.

I was Trying to get it like

public function __construct(ValidationFactory $validation)
{
    $this->middleware(array('auth', 'lockscreen'));
    var_dump(\Auth::user();
    die;  
}

this do not works.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2spqiCV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire