What do i say ? Why do expect to access the User::method() when you have not defined it there,
User::method() ; // means you are accessing the method (static) defined in User class
$user->method() ; // means you are accessing the method defined in User class, from a user instance
Define the method in User class and not custom Auth controller, or else if you wnat to define in Auth controller, access it like
protected function loginValidation($data)
{
$rules = array(
'fname' => 'required|max:255',
'lname' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
);
return Validator::make($data, $rules);
}
protected function getLoginCredentials(Request $request)
{
$validator = $this->loginValidation(Request::all());
if($validator->passes())
{
return[
'email' => Request::input('email'),
'password' => Request::input('password'),
'type' => 1
];
return true;
}else{
return redirect()->back()->withErrors();
}
}