-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I have next menu
<div class="list-group">
<a href="{{route('products')}}"
class="list-group-item list-group-item-action {{ active(route('products', ['category' => null])) }}">
All
</a>
@foreach(App\Category::all() as $category)
<a class="list-group-item list-group-item-action {{ active(route('products', ['category' => $category->slug])) }}"
href="{{route('products', ['category' => $category->slug])}}"
>
{{$category->name}}
</a>
@endforeach
</div>
This is a munu of categories. Route is next (Note - In category menu I do not use now label)
Route::get('/products/{category?}/{label?}', 'CatalogController@index')->name('products');
I show products in category with pagination. First page (without ?page= in url) is fine - munu have active class. But if there are isset ?page= in url - no active class in munu. If I add Label to url - no active class too.
Metadata
Metadata
Assignees
Labels
No labels