Skip the route parameter from being passed to the closure function in Laravel

75 Views Asked by At

Is it possible to skip the route parameter from being passed to the closure function in Laravel 10.x? For example, do not pass the locale to the closure function.

Route::get('/{locale}/{parem1}/{parem2}', function (Request $request, $param1, $param2) {

    echo "$param1 : $param2";
    
})->whereIn('locale', ['an', 'ar']);
0

There are 0 best solutions below