📅  最后修改于: 2022-03-11 14:54:17.385000             🧑  作者: Mango
//Use Route::get('/path/{id}/{start?}/{end?}', 'Controller@index');
//and handle the parameters in the controller function:
public function index($id, $start = null, $end = null)
{
if (!$start) {
// set start
}
if (!$end) {
// set end
}
// do other stuff
}