Level 1
Jan 11, 2019
2
Level 1
class function use in where query
in my user class i have function isOnline(), it return boolean
public function isOnline()
{
return Cache::has('user-is-online' . $this->id);
}
i want to query get all online members . how i use this function inside query ??
User::where('here i need code which check isOnline return true or false')->get();
Please or to participate in this conversation.