In model, User.php I set a function call isStatus()
public function isStatus(){
return $this->status; // 1 of mysql table column name status, let say 0 is admin and 1 is normal user.
}
In controller name LoginController.php, I want to make it if user status is 0 will go /admin page, other will go to / page which mean main page.
protected function authenticated($request, $user){
if($user->isStatus('0')){
return redirect('/admin');
}else{
return redirect('/');
}
}
User table with 'status' column are boolean but is not working.