protected function authenticated(Request $request, $user)
{
//
$user = User::findOrFail($user);
return $user;
//$arruser = $user->toArray();
/* if($user->status==0){
Auth::logout();
return redirect('login')->with('verify_info','Verify First');
}*/
}
$user returning--->
id 54
name "Rasul"
email "golam.rasul@gmail.com"
verify_token "BiOF8L8DJb"
status 0
created_at "2017-07-26 09:39:46"
updated_at "2017-07-26 09:39:46"
Problem is when i m trying to get value of status using
$user-> status it says Property [status] does not exist on this collection instance.
When you do return $user
you get a collection How about you get an object by first()
, then get the property status.
Something like this :
$user = User::findOrFail($user)->first();
return $user;