Answer the question
In order to leave comments, you need to log in
How to set a route in Laravel for all pages except the main one?
Good evening
For the main page in Laravel, there is a simple route:
Route::get('/', function () {
return view('main');
});
Answer the question
In order to leave comments, you need to log in
No way. A route is a logic connection with what is in the address bar.
If you need to display something in the general template everywhere except the main one, it would be logical to place in it a conditional section that is not displayed on the main page.
Route::get('/', function () {
return view('main');
});
// для всех остальных страницы через группы пишешь
Route::group();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question