Usually happens when you try to use an HTTP
method for a route but you have not defined
that method in your routes file. For example,
if you POST to a method, but you only
define a GET method for the route in routes.php.
public function index()
{
if (Session::has('userToken'))
{
/*Retrieve data of user from DB using token & Load view*/
return View::make('members/profile');
}else{
return View::make('members/login');
}
}
public function validateCredentials()
{
if(Input::post())
{
$email = Input::post('email');
$password = Input::post('password');
return "Email: " . $email . " and Password: " . $password;
}else{
return View::make('members/login');
}
}