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

rest - Spring boot: Request method 'PUT' not supported -

php - Magento - Deleted Base url key -

symfony - imagine_filter() not generating the correct url in LiipImagineBundle -