1

Im trying to include a different nav if the user is logged in. I need to do this in my view (I know the logic should really go elsewhere but I need it here).

 @include( {{ Auth::guest() ? 'nav-a' : 'nav-b' }} )

The above fails to work:

development.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'syntax error, unexpected '<', expecting ')'' 

1 Answer 1

1

It's because when you are working in the confines of an @ statement, php is already assumed.

@include( Auth::guest() ? 'nav-a' : 'nav-b' )
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.