I'm trying to send data from a form via the POST method, but it's not going to work at all.
Follow my code
// routes.php
Route::any('/', function()
{
echo Request::getMethod(); // Aqui esta sempre retornando GET
return View::make( 'login' );
});
// view/login.blade.php
<form action="{{URL::to('/')}}" method="post">
<input name="login" type="text"/><br/>
<input type="password" name="senha" id=""/><br/>
{{ Form::submit('Enviar') }}
</form>
Regardless of whether the screen was loaded by the link or the submit button, the return from Request :: getMethod () is always being GET, so it does not have any data in $ _POST, why does this happen?