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.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire