I just want to know if there’s a trick for this.Say I have a route with optional variable $mod
:
$app->get('/categories(/edit-:mod)', function($mod = 0) use ($app) {
}->name('category')
if I call its urlFor('category')
it would output:
/categories/edit-:mod
even I did not supply parameter to :mod
, is there a way to just make the output
/categories
since I do not want to to have the dummy variable and parameter to always show at the default link
Thanks!