php - Check for authentication, output different nav? -
im trying include different nav if user logged in. need in view (i know logic should go elsewhere need here).
@include( {{ auth::guest() ? 'nav-a' : 'nav-b' }} )
the above fails work:
development.error: exception 'symfony\component\debug\exception\fatalerrorexception' message 'syntax error, unexpected '<', expecting ')''
it's because when working in confines of @
statement, php assumed.
@include( auth::guest() ? 'nav-a' : 'nav-b' )
Comments
Post a Comment