M
M
marq2022-03-03 08:38:01
Laravel
marq, 2022-03-03 08:38:01

Why do routes not work if I add a route to the place of the route name add a parameter?

Added this route:

Route::get('/{link}/{id}', [\App\Http\Controllers\TeamController::class, 'add'])->name('add')->middleware('auth');

after that, he stopped seeing other routes, throws out 404 when switching

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pLavrenov, 2022-03-03
@marq

Put it after all other routes. Doesn't work because right now this controller is trying to process all other pages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question