optional parameters laravel code example
Example: laravel optional params
//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
}