Answer the question
In order to leave comments, you need to log in
How to remove localizations in laravel controllers?
laravel 5.7.6
All routes wrapped in a group
Route::group(['prefix' => '{locale}', 'middleware' => 'locale'], function () {
//....
});
public function edit(User $user)
{
//
}
public function edit($locale, User $user)
{
//
}
Answer the question
In order to leave comments, you need to log in
In middleware BEFORE calling $next($request):$request->route()->forgetParameter('locale');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question