Recognize online visitors
Retrieve and Determine Online users
use Shetabit\Visitor\Traits\Visitor
in your User
class at first.
then you can retrieve online users which are instance of User
class and determine if a user is online.
visitor()->onlineVisitors(User::class); // returns collection of online users
User::online()->get(); // another way
visitor()->isOnline($user); // determines if the given user is online
$user->isOnline(); // another way