Reputation: 1
I wanted to use Sentinel::getUser() in the AppServiceProvider.php to make it global in all front-end files.
I include it in the boot function, like this:
view()->share( 'loggedUser', Sentinel::getUser() );
or
View::share("loggedUser",Sentinel::getUser());
Also have I included:
use Cartalyst\Sentinel\Native\Facades\Sentinel;
But when I do it the only response is NULL. When I use Sentinel:getuser() in a blade file it works.
Not only is it giving NULL as response, when I have that included my php artisan also return NULL on every command I make.
Does anyone know what to do?
Upvotes: 0
Views: 471