Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel assign class dynamically if condition true

<li class="nav-item {{ request()->is('blog') ? 'active' : ''}}">
    <a class="nav-link " href="{{ url('blog') }}">{{ __('sentence.Blog') }}</a>
</li>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #assign #class #dynamically #condition #true
ADD COMMENT
Topic
Name
2+1 =