Laravel 5: Change navbar if user is logged

后端 未结 6 446
盖世英雄少女心
盖世英雄少女心 2021-02-03 18:57

I\'m completely new to Laravel, MVC and templating engines in general.

I need to show certain navbar buttons and options if a user is logged in such as: Notifications, L

6条回答
  •  一整个雨季
    2021-02-03 19:23

    This should help :

    @extends(Auth::check() ? 'partials.navbarlogged' : 'partials.navbar')
    

    The Auth::chek() sees whether the user is logged in or not and returns a boolean.

提交回复
热议问题