vendredi 29 janvier 2016

Allow guest to view a function but restrict menu item in Laravel 5.2

I have a dashboard page that guests and logged in users can view. If a user authenticate, I want to display certain menu items. If the user is a guest, he/she doesn't see the menu.

I have the following line in my view.

@if (Auth::check())
    _DISPLAY MENU ITEM_
@endif

The menu does not show up. It does show up when I log in successfully.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1m2gDd8
via IFTTT

Aucun commentaire:

Enregistrer un commentaire