I used POST method in my form to submit the value. Here is my form code:
<form action="{{ url('/') }}" method="POST">
<input type="hidden" name="value1" value="one" />
<input type="hidden" name="value2" value="two" />
<input type="submit" value="SEND!" />
</form>
and router.php code:
Route::get('/', function()
{
return View::make('index');
});
Route::post('/', function()
{
$data = Input::all();
var_dump($data);
});
whether every time I pressed SEND button it shows the index file. When I tried commenting out the get method. Now it shows a MethodNotAllowedHttpException
error. On error message it shows that request method is GET
What should I do now? Is that a bug? Or something wrong in my script?