最新のLaravel 5.3バージョンを実行していて、php artisan make:auth
を実行した後、アプリケーション内でログアウトしようとしました。このエラーはMethodNotAllowedHttpException
です。Laravel auth scaffoldingがMethodNotAllowedHttpExceptionを返します
Web.php(ルートファイル):
Route::get('/', function() {
return view('welcome');
});
Route::auth();
Auth::routes();
Route::get('/home', '[email protected]');
私はビューが作成されていることがわかりますが、なぜそれがこのエラーを返すのですか?事前に多くのありがとう
あなたはgenrated' laravelの認証route'に新しい 'routes'を追加しました:auth(); '' php artisan make:auth'を実行した後です。 –
このファイル '/ app/Http/Controllers/Auth/LoginController.php'に、この行' public function __construct() { $ this-> middleware( 'guest'、['except' => 'ログアウト'])); } 'は –