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

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -