While using following route with 2 optional parameters,
Route::get('/abc-{abc_id?}/xyz-{xyz_id?}', function($abc_id=0, $xyz_id=0)
{
return "
hello ... World";
});
For requests
/abc-1/xyz-15 - Hello World
/abc-1/xyz - Hello World
But for
/abc-/xyz-15 - 404
/abc/xyz-15 - 404
Why first optional parameter not working properly? Is there any alternate solutions?
Please note both parameters are in url not as a get attribute