【发布时间】:2016-08-19 23:57:20
【问题描述】:
我正在使用带有 2 个可选参数的路由,我希望可以选择其中任何一个参数,因为它们用于 where 子句。 where 子句可以用在第一个参数或第二个参数上。
我试过了:
Route::get('activityperemployee/employee_id/{employee_id?}/month/{month?}', ['uses'=>'Ajax\ActivityAjaxController@getActivityPerEmployee','as'=>'ajaxactivityperemployee']);
但问题是,如果我不设置这两个参数,我将无法再找到该页面。
【问题讨论】:
标签: laravel