I am just starting with Laravel after finally deciding to move from CodeIgniter, however I cannot get a simple login form to work. I keep getting that "MethodNotAllowedHttpException" error.
Here is how my Controller looks
class LoginController extends BaseController {
public function login()
{
$username = $_POST['username'];
$password = $_POST['password'];
Login::login($username, $password);
// ^ Call to Login model to check the user's credentials - everything fine there
}
}
Here is my view
{{ Form::open(array('url' => 'LoginController/login')) }}
{{ Form::text('username') }}
{{ Form::password('password') }}
{{ Form::submit('Submit') }}
{{ Form::close }}
And my route for this is like
Route::get('LoginController/login', 'LoginController@login');
I'm doing something horribly wrong somewhere, can you guys please point it out?
Thanks!