Hello @ajax30
Did you place the dd(session('userPermissions'))
in your gate function or outside?
Gate::define('view-users', function() {
// like here
return in_array('view-users', session('userPermissions'));
});
If it is outside I understand that the session is empty because it is loaded before the session data is loaded. Else I suspect that it should be filled.
ajax30 liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community