Answer the question
In order to leave comments, you need to log in
How to remove from CNC Action in Laravel?
I want to migrate my blog from wordpressa to laravel. The question arose about the implementation of CNC as one of the most important elements of the site. Now I have 2 types of addresses
(categories) on my blog
niksongames.ru/faq for
niksongames.ru/skachat-igru-steep-free-do-22-maya/
// если я пишу просто алиас, то даже если я изменю controller и Action будет ошибка
Route::get('/{alias}','[email protected]')->name('show');
Route::get('/thems/{alias}',' [email protected]')->name('category');
Answer the question
In order to leave comments, you need to log in
Based on the discussion in the comments,
It seems to me that this is achievable in only one way - one route and one controller for it, and already in the controller you will take the alias value and determine what to do next.
Just swap these routes, i.e.
Route::get('/thems/{alias}',' [email protected]')->name('category');
Route::get('/{alias}','[email protected]')->name('show');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question