我在 Laravel 5.0.x 中使用 rydurhmam/sentinel 包,我无法更改默认 mysite.com/profile 路由的处理方式。
在我的 routes.php 文件中我已经声明Route::resource('profile', 'ProfileController');
当我调用 php artisan route:list 我得到:
| GET|HEAD | profile | sentinel.profile.show | Sentinel\Controllers\ProfileController@show | sentry.auth |
| GET|HEAD | profile/create | profile.create | App\Http\Controllers\ProfileController@create | sentry.auth |
| POST | profile | profile.store | App\Http\Controllers\ProfileController@store | sentry.auth |
| GET|HEAD | profile/{profile} | profile.show | App\Http\Controllers\ProfileController@show | sentry.auth |
| GET|HEAD | profile/{profile}/edit | profile.edit | App\Http\Controllers\ProfileController@edit | sentry.auth |
| PUT | profile/{profile} | profile.update | App\Http\Controllers\ProfileController@update | sentry.auth |
| PATCH | profile/{profile} | | App\Http\Controllers\ProfileController@update | sentry.auth |
| DELETE | profile/{profile} | profile.destroy | App\Http\Controllers\ProfileController@destroy | sentry.auth |
您会注意到第一个配置文件路由由供应商包文件中的 Sentinel 控制器处理。
哨兵配置文件只允许您完全关闭路由,所以无论如何要覆盖选定的控制器还是我是 SOL?