I am not sure what exactly are u asking but if you want to make routes for every entity of category, you can do easily something like category/{id} in routes so its than something like:
Route::get('/category/{id}', function () {
return view('category@show');
});
It is explained in this video from 6th minute: https://laracasts.com/series/laravel-from-scratch-2017/episodes/11
Hope this will help. Let me know.
I meant that i didn't declare "category" word in my routes. In this case was executed this route:
'<controller:\w+>/<id:\d+>' => '<controller>/view',
I suppose it would looks like:
Route::get('/{controller}/{id}', function () {
return view('{controller}@show');
});
I havent tried that yet but I think it is possible in the same way as I mentioned with ID if laravel supports more vars in url. Did you try it?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community