Hello. It is necessary to make routes:

sitename.ru/articles //получаем все артиклы sitename.ru/articles/slugArticle //переход на артикл из ./articles sitename.ru/articles/slugCategory //выводим артиклы данной категории sitename.ru/articles/slugCategory/slugArticle //переход по артиклу данной категории 

I can not understand how to register it in the routs, I do the type:

 Route::get('/recipes','RecipesController@index'); Route::get('/recipes/{slugRecipe}','RecipesController@showRecipe'); Route::get('/recipes/{slugTag}', 'TagsController@showTag'); Route::get('/recipes/{slugTag}/{slugRecipe}', 'RecipesController@showTest'); 

Naturally Lara swears at me for such curves routes ... Tap your finger on how to properly implement.

  • 3
    She swears because 2 and 3 Routes she does not like to discern! in fact, you tell her to do this' / recipes / {blablabla} 'do RecipesController @ showRecipe'), and '/ recipes / {blablabla}' do 'TagsController @ showTag'); - Orange_shadow
  • one
    You need to either specify some restrictions on the rules to make them different, or change the logic, for example Route::get('/recipes/tag/{slugTag}', 'TagsController@showTag') ; Route::get('/recipes/{slugRecipe}/tag/{slugTag}', 'RecipesController@showTest') - Orange_shadow

0