Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel active menu item

// check using uri
<li class="{{ request()->is('sites/*/edit') ? 'active' : '' }}"
 // or, check using route name
<li class="{{ request()->routeIs('sites/*/edit') ? 'active' : '' }}"
  // or, using segment
<li class="{{ (request()->segment(2) == 'cities') ? 'active' : '' }}"> 
Comment

laravel active nav

<a class="list-item-link {{ Route::currentRouteName() === 'admin.ads.index' ? 'active' : '' }}" >
Comment

nav active in laravel

//  check using route name
<li class="{{ request()->routeIs('city/create') ? 'active' : '' }}"
Comment

laravel menu active class

  <li class="profile__link__item">
            <a class="profile__link profile__link__address {{ (request()->routeIs('web.address.index')) ? 'activated ' : '' }}"
               href="{{ route('web.address.index') }}">Адреса</a>
        </li>
Comment

PREVIOUS NEXT
Code Example
Php :: How To Force Redirect HTTP To HTTPS In Laravel Using htaccess 
Php :: wp get post author link 
Php :: laravel validate max file size 
Php :: read global laravel request() 
Php :: laravel transform object to array 
Php :: wherein laravel 
Php :: laravel faker title 
Php :: date to string in php 
Php :: carbon two day ago 
Php :: php date is before 
Php :: how to create new project in laravel 
Php :: combine date and time in php 
Php :: laravel group by on subquery 
Php :: php remove element from array 
Php :: laravel load view in variable 
Php :: php utf8_decode 
Php :: php to call javascript function 
Php :: how to check if there is an authenticated user laravel 
Php :: remove index.php in codeigniter 
Php :: laravel model create array 
Php :: How do I make a redirect in PHP? 
Php :: convert float to integer laravel 
Php :: random word using a wordlist php 
Php :: php get ip from host 
Php :: laravel-socialite-invalidstateexception 
Php :: array_last in laravel 8 
Php :: php sql get single value 
Php :: laravel validation required_if one parameter exist 
Php :: laravel hasmany count 
Php :: php cli display errors 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =