I know how to use regular expression on route constraints but I want to use use fixed value instead of regular expression like this :
Route::get('{param}/delete/{id}',array(
'as' => 'delete-post',
'uses' => 'MainController@delete'
))->where(['param',['post','page'],'id'=>'[0-9]+']);
When I try this , i get the error like Routing requirement for "param" must be a string.
What I want is the value of param
parameter is to be fixed and it should be either post
or page
. So, how can I achieve like above ?