Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message Laravel 5.5

前端 未结 4 1458
再見小時候
再見小時候 2021-01-12 03:08

This is doing my head in. I\'m getting this error when trying to login from a form:

Symfony \\ Component \\ HttpKernel \\ Exception \\

Me

4条回答
  •  灰色年华
    2021-01-12 03:41

    Error in the route you've defined. Its get and should change to post

    change this

    Route::get('/login', ['as' => 'login', 'uses' => 'LoginController@getLogin']);
    

    to this

    Route::post('/login', ['as' => 'login', 'uses' => 'LoginController@getLogin']);
    

    action="{{ route('login') }}" # form Submit action
    

提交回复
热议问题