Level 51
Try this
$app->get('/{route}/{method}/[{parameters}]/[{cookie}]', function ($route, $method, $parameters, $cookie) use ($app) {
}
https://laracasts.com/discuss/channels/general-discussion/lumen-route-with-optional-parameters
I tried to get a route with optional parameters following the FastRoute syntax but I didn't have succes. Is this correct?
$app->get('/{route}/{method}/{parameters?}/{cookie?}', function ($route, $method, $parameters, $cookie) use ($app) {
}
Where parameters and cookie should be optional.
If it's not can you tell me how to write it?
I have the feeling that this is not possible to have since in the documentation there's no mention to optional parameters but I wanted to double check :)
Thanks
Please or to participate in this conversation.