I want to be able to get a logged in user's details in my views. E.g .
Here's my Controller.php
:
public $view_data = array();
public function __construct()
{
$this->middleware('auth');
$this->view_data['user'] = Auth::user();
}
$user
in my views return NULL
. Am I missing something?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire