I am new to Laravel 4 and trying to figure out why I get an error message that the [show] method does not exist.
I don’t have a method called "show" and I can only imagine that this is a Laravel internal method, but I don’t know how to influence this or what could do it. Any thoughts or help on this would be incredibly appreciated since I was stuck with this for two days and cannot understand what I'm doing wrong.
View:
<li><a href="{{ URL::route('account-sign-in') }}">Sign in</a></li>
Route:
Route::get('/account/sign-in', array(
'as' => 'account-sign-in',
'uses' => 'AccountController@getSignIn'
));
AccountController:
class AccountController extends BaseController {
public function getSignIn(){
return View::make('user.signIn');
}
public function postSignIn(){
$validator = Validator::make(Input::all(), array( 'email' => 'required|email', 'password' => 'required' ) );
if($validator->fails()){
return Redirect::route('account-sign-in') ->withErrors($validator) ->withInput();
}
else {
$remember = (Input::has('remember')) ? true : false;
$auth = Auth::attempt(array( 'email' => Input::get('email'), 'password' => Input::get('password'), 'active' => 1 ), $remember);
if($auth){
return Redirect::intended('/');
}
else {
return Redirect::route('account-sign-in')->with('global', 'Email/password wrong, or account not activated.');
}
}
return Redirect::route('account-sign-in') ->with('global', 'There was a problem signing you in.');
}
}
source
share