jeudi 28 novembre 2019

How can I verify if the user is logged in? I need to show stuff only if users are loged in.This is the code um using

@if(auth()->user()->isAdmin())

content

@endif

@if(auth()->user()->isNormal())

content

@endif

and then if the is not logged in i get this error:

Call to a member function isAdmin() on null (View: C:\Users\marco\laravel projects\final\resources\views\layouts\user.blade.php)



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37Qu0GW
via IFTTT

Aucun commentaire:

Enregistrer un commentaire