Answers for "laravel menu active"

PHP
4

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' : '' }}">
Posted by: Guest on May-01-2021
0

set nav link active on the basis of route laravel

<li class="{{ (request()->is('admin/cities*')) ? 'active' : '' }}">
Posted by: Guest on December-03-2020
1

laravel sidebar menu active

{{  request()->routeIs('news.*') ? 'active' : '' }}
Posted by: Guest on August-16-2020

Browse Popular Code Answers by Language