Support the ongoing development of Laravel.io →
Requests Input
Last updated 2 years ago.
0

Can you show your routes file and the form code? It seems something is not defined corretcly.

Options are:

  • Your route not defined as POST
  • Invalid method in controller, if you're using one
  • Form sending data as GET, instead POST
0

//route.php

Route::post('/',function(){ $data = Input::all(); var_dump($data); });

//view/form.blade.php

<form action="{{ url('/') }}" method="POST"> <input type="text" name="test" value="test" /> <input type="submit" /> </form>

When i click submit, post data to the home path, and it had error.. symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException

But when i change the action to other path, it's okay.

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

laisangbum laisangbum Joined 29 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.