how to solve id in route and controller in laravel localization
I get the error: Missing required parameter for [Route: postDetails] [URI: {language}/cars/{id}] [Missing parameter: id]." My Routes: Route::prefix('{language}')->group(function () { Route::get('/',[HomeController::class,'homePage'])->name('home'); Route::get('cars',[AllPostsController::class,'allPosts'])->name('allPosts'); Route::get('cars/{id}',[AllPostsController::class,'details'])->name('postDetails'); }); My Middleware: public function handle(Request $request, Closure $next): Response { App::setLocale($request->language); return $next($request); } My Controller:…