Ad

Laravel Request Is Css Not Working With Id

- 1 answer

I'm using the following line of code to make the div active:

{{ Request::is('admin/customers') ? 'active_admin_menu' : null }}

This works great when the link is on admin/customers, but as soon as the link goes to admin/customers/123 then the link goes non active again.

Is there a way to fix this?

Ad

Answer

You could try adding a wildcard

Request::is('admin/customers*')
Ad
source: stackoverflow.com
Ad