here is my code i am trying to login but its not working, data comes till before but something wrong in -> Auth::login($user1); though if i put Auth::login($user1); in if() condition it goes inside but not redirect in if condition,
if(count($staff) > 0)
{
$staff['0']['type']='staff';
$staff['0']['name']=$staff['0']['emp_name'];
unset($staff['0']['emp_name']);
Session::put('user',$staff['0']);
$id= $staff[0]['id'];
$user1 = Staff::find($id);
//print_r($user);exit;
//return Auth::login($user);
Auth::login($user1);
return redirect()->intended('/student');
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire