Answer the question
In order to leave comments, you need to log in
How to build routes in Laravel with the same template for different entities?
There is a site on Laravel
The site has routes for ads:
Route::get('{post}', '[email protected]); //например: http://my-domai.com/slug-some-post-1
Route::get('{city}', '[email protected]); //например: http://my-domai.com/slug-some-city-1
Route::get('{entity}', '[email protected]);
Answer the question
In order to leave comments, you need to log in
No, if you don’t add any impurities to the slug, then just take out the table with the slugs separately, as you say, done in Drupal. And use polymorphic relationships https://laravel.com/docs/5.6/eloquent-relationship...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question