Route Params

//id is required and must be a number
Route::get('/order/{id}', 'Api\[email protected]')
    ->where('id', '[0-9]+');
	
//mobile is not required
Route::get('/verify_codes/{mobile?}', 'Api\[email protected]_codes');

public function verify_codes(Request $req, $mobile=null){
	logg($mobile);
}

Route::group(['prefix'=>'product'], function () {
    $cname = 'ProductC';
    Route::get('/single/{id}{sep}{name}', $cname . '@single')
        ->where('id', '[0-9]+')
        ->where('sep', '-*')
        ->where('name', '.*');
});

Get param value in controller

$request->route('param1');