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 :: php pdo check if update query successful 
Php :: create foreign key laravel migration 
Php :: php send telegram message to user 
Php :: laravel collection search by value 
Php :: php check if headers already sent 
Php :: mac address php 
Php :: drupal 7 hook_form_alter 
Php :: laravel reduce 
Php :: getMessage in php 
Php :: reset password multipple database laravel 
Php :: Laravel required if it meet some value from another field 
Php :: laravel asset 
Php :: php get value from url 
Php :: php get current dir mac 
Php :: disable laravel passport 
Php :: laravel launch only one dusk test 
Php :: get ip address in laravel 
Php :: installing bootstrap ui in laravel app 
Php :: wordpress translate specific text php 
Php :: php artisan ui tailwind css 
Php :: access json object in php 
Php :: how to use plugin shortcode in wordpress template 
Php :: current user wordpress 
Php :: left join laravel 
Php :: php 
Php :: php array has key 
Php :: fetch data from live website curl php 
Php :: How to check if email exists in laravel login 
Php :: steps to create laravel project 
Php :: laravel pass variables to view 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =