Php Laravel routes以小写字母发布

Php Laravel routes以小写字母发布,php,laravel,routes,laravel-5,Php,Laravel,Routes,Laravel 5,我正在尝试设置此路线 http://test.localhost.com/doctor/updateschedule 我在路由文件中的代码是 Route::resource('/doctor/updateschedule', 'Doctor\DoctorController@doctorSchedule'); 但这不起作用,它只在我使用大写字母时起作用 http://test.localhost.com/Doctor/updateschedule 在路线上, Route::resource

我正在尝试设置此路线

http://test.localhost.com/doctor/updateschedule
我在路由文件中的代码是

Route::resource('/doctor/updateschedule', 'Doctor\DoctorController@doctorSchedule');
但这不起作用,它只在我使用大写字母时起作用

http://test.localhost.com/Doctor/updateschedule
在路线上,

Route::resource('/Doctor/updateschedule', 'Doctor\DoctorController@doctorSchedule');
控制器的动作中没有任何内容,只有一个回声“你好”。 它只适用于大写字母/Doctor/updateschedule


有人能告诉我为什么会发生这种情况,以及我如何使它适用于小写字母吗?

尝试删除第一个斜杠,这样就有了
Route::resource('doctor/updateschedule','doctor\DoctorController@doctorSchedule');
听起来好像您有另一条路线与小写的
doctor
冲突。您能发布所有以
doctor
(或
/doctor
)开头的路由吗?@V4n1ll4我刚试过,没有用。@lukasgeiter没有,我仔细检查过,我没有在文件中的任何其他地方使用相同的路由。这是唯一的。您的路由有问题,您无法将资源路由添加到特定的控制器方法(
doctorSchedule
),而只能添加到控制器类。您确定不应该为此使用简单的
Route::get()
?请尝试删除第一个斜杠,这样您就有了
Route::resource('doctor/updateschedule','doctor')\DoctorController@doctorSchedule');
听起来好像您有另一条路线与小写的
doctor
冲突。您能发布所有以
doctor
(或
/doctor
)开头的路由吗?@V4n1ll4我刚试过,没有用。@lukasgeiter没有,我仔细检查过,我没有在文件中的任何其他地方使用相同的路由。这是唯一的。您的路由有问题,您无法将资源路由添加到特定的控制器方法(
doctorSchedule
),而只能添加到控制器类。您确定不应该为此使用简单的
Route::get()