i have table in my database that contains all my products categories, for example, accesories, books, toys, whatever.. i need to make routes in base of those categories (i show some of those categories in the home page and i made links with the localhost/public/CATEGORY_NAME url) so, this is my routes.php:
Route::get('/', 'HomeController@index');
what i think i gotta do is catch the 1st parameter in the url and route it to a specific controller for example ProductController@index, i'm new to laravel so i don't know how can i do that, any ideas? thanks
i've read in another post i can use Route::any with regular expressions or something like that but that "any" includes the root index am i right?