use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Reminders\RemindableInterface;
class Jobseeker extends Eloquent implements UserInterface, RemindableInterface {
protected $table = 'jobseekers';
public function getAuthPassword()
{
return $this->userpassword;
}
}
// JobseekerController
public function postSignIn() {
$validator = Validator::make(Input::all(),
array(
'email' => 'required|email',
'userpassword' => 'required'
)
);
if($validator->fails()) {
return Redirect::route('jobseeker-sign-in')
->withErrors($validator)
->withInput();
} else {
Config::set('auth.model', 'Jobseeker');
$auth = Auth::jobseeker()->attempt(array(
'email' => Input::get('email'),
'userpassword' => Input::get('userpassword'),
'active' => 1
));
if($auth) {
// Redirect to the intended page
return View::make('jobseeker.home');
} else {
return Redirect::route('jobseeker-sign-in')
->with('global', 'Email/password wrong, or account not activated.');
}
}
return Redirect::route('jobseeker-home')
->with('global', 'There was a problem signing in you.');
}
This error shows:: production.ERROR: exception 'ErrorException' with message 'Undefined index: password' in H:\xampp\htdocs\myjobportal\vendor\laravel\framework\src\Illuminate\Auth\EloquentUserProvider.php:106
Stack trace:
why does it show???
I dont know what should i do, plz help me....in which part i have to change...
// auth.php
// Jobseeker.php model file // <?php
use Illuminate\Auth\UserTrait; use Illuminate\Auth\UserInterface; use Illuminate\Auth\Reminders\RemindableTrait; use Illuminate\Auth\Reminders\RemindableInterface;
class Jobseeker extends Eloquent implements UserInterface, RemindableInterface {
use UserTrait, RemindableTrait; protected $fillable = ['fullname','mothersname','fathersname','gender', 'marital','religion','dateofbirth','nationalid','email', 'userpassword', 'password_temp', 'code', 'active'];
}
// JobseekerController
public function postSignIn() { $validator = Validator::make(Input::all(), array( 'email' => 'required|email', 'userpassword' => 'required' ) );
This error shows:: production.ERROR: exception 'ErrorException' with message 'Undefined index: password' in H:\xampp\htdocs\myjobportal\vendor\laravel\framework\src\Illuminate\Auth\EloquentUserProvider.php:106 Stack trace: why does it show??? I dont know what should i do, plz help me....in which part i have to change...