dimanche 30 septembre 2018

Error when POSTing a form to auth route (MethodNotAllowedHttpException)

I am trying to POST a form BEFORE user authentication. User inputs data into a form and POST it to the route protected by auth:

Route::group(['middleware'=>'auth'], function(){ Route::post('v2/payment/start/','PaymentController@generic');

});

If a user IS authenticated BEFORE the POST, the request is processed OK. If a user is NOT authenticated, user gets the login form, enters login password and receives the error "MethodNotAllowedHttpException".

What could be the cause of this? In my LoginController I have:

return redirect()->intended($this->redirectPath());

so, the user should be redirected OK.

Where could be the error?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2NOMocG
via IFTTT

Aucun commentaire:

Enregistrer un commentaire