我使用Hesto multi-auth进行多重身份验证。我制作了控制器,路线和其他,但当我尝试打开网址时,例如localhost:8000 / student / register它抛出NotFoundHttpException。
这是路线的例子
Route::group(['domain' => 'student.' . env('APP_DOMAIN')], function () {
Route::get('/login', 'StudentAuth\LoginController@showLoginForm');
Route::post('/login', 'StudentAuth\LoginController@login');
Route::post('/logout', 'StudentAuth\LoginController@logout');
Route::get('/register', 'StudentAuth\RegisterController@showRegistrationForm');
Route::post('/register', 'StudentAuth\RegisterController@register');
Route::post('/password/email', 'StudentAuth\ForgotPasswordController@sendResetLinkEmail');
Route::post('/password/reset', 'StudentAuth\ResetPasswordController@reset');
Route::get('/password/reset', 'StudentAuth\ForgotPasswordController@showLinkRequestForm');
Route::get('/password/reset/{token}', 'StudentAuth\ResetPasswordController@showResetForm');
});
这是例外
in RouteCollection.php line 179
at RouteCollection->match(object(Request)) in Router.php line 533
at Router->findRoute(object(Request)) in Router.php line 512
at Router->dispatchToRoute(object(Request)) in Router.php line 498
at Router->dispatch(object(Request)) in Kernel.php line 174
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in ValidatePostSize.php line 27
at ValidatePostSize->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53
at require_once('F:\\Studia\\Sem 3 mgr\\Praca magisterska\\thesis_system\\public\\index.php') in server.php line 21
答案 0 :(得分:0)
您似乎只在域/register
上为student.<your-app-domain>
定义了路径,但在您的请求中,域名为localhost
,路径为/student/register
,因此与任何路径定义都不匹配。