好像我的路线都搞砸了。
我的路线和我的链接到了错误的地方
输入/user/attendees/index
会转到views / attendees / show.php
在/user/attendees
中输入/ views / attendees / edit
运行artisan dump-autoload和composer dump-autoload无法修复。
#$ ^!正在进行?!
工匠路线| grep与会者
| | GET|HEAD user/attendees | user.attendees.index | UserAttendeeController@index | auth | |
| | GET|HEAD user/attendees/create | user.attendees.create | UserAttendeeController@create | auth | |
| | POST user/attendees | user.attendees.store | UserAttendeeController@store | auth, csrf | |
| | GET|HEAD user/attendees/{attendees} | user.attendees.show | UserAttendeeController@show | auth | |
| | GET|HEAD user/attendees/{attendees}/edit | user.attendees.edit | UserAttendeeController@edit | auth | |
| | PUT user/attendees/{attendees} | user.attendees.update | UserAttendeeController@update | auth | |
| | PATCH user/attendees/{attendees} | | UserAttendeeController@update | auth | |
| | DELETE user/attendees/{attendees} | user.attendees.destroy
路由
// User reset routes
Route::get('user/reset/{token}', 'UserController@getReset');
// User password reset
Route::post('user/reset/{token}', 'UserController@postReset');
//:: User Account Routes ::
Route::post('user/{user}/edit', 'UserController@postEdit');
//:: User Account Routes ::
Route::post('user/login', 'UserController@postLogin');
//:: Application Route ::
Route::group(array('prefix' => 'user', 'before' => 'auth'), function()
{
Route::resource('attendees', 'UserAttendeeController');
});
//update the program bookings
Route::post('user/{user}/registration', 'UserController@postRegistration');
# User Implicit User Routes.
Route::controller('user', 'UserController');
答案 0 :(得分:0)
输入/ user / attendee / index转到views / attendees / show.php
是的,因为它应该按GET|HEAD user/attendees/{attendees}
命中。索引路线为GET|HEAD user/attendees
。
键入/ attendee / index转到NOT found HttpException
您的所有路线均不以/attendee/
开头。您正在寻找的网址可能是/attendees
。
键入/ user / attendee会查找未定义的Route [attendee.edit]。
是的,因为它与Route::controller('user', 'UserController');
匹配