I am trying to use the ternary operator using blade to print out the active class for an <li> tag by checking the name of the current route using the code below
<li class="nav-item {{ Route::currentRouteName() == 'backend.categories' ? 'active' : '' }}">
However, this doesn't work and i am presented with a ParseError which says
syntax error, unexpected identifier "backend", expecting ")"