shetabit/visitor
Track and log Laravel visitors: browser, platform, device, IP, languages, user agent, and request data. Use visitor() helper or $request->visitor(). Record visits for any model via Visitable trait, count views/unique visitors, and detect online users.
Full Changelog: https://github.com/shetabit/visitor/compare/v4.5.3...v4.5.4
Full Changelog: https://github.com/shetabit/visitor/compare/v4.5.2...v4.5.3
Full Changelog: https://github.com/shetabit/visitor/compare/v4.5.1...v4.5.2
Full Changelog: https://github.com/shetabit/visitor/compare/v4.5.0...v4.5.1
Full Changelog: https://github.com/shetabit/visitor/compare/v4.4.1...v4.4.2
Full Changelog: https://github.com/shetabit/visitor/compare/v4.4.0...v4.4.1
Full Changelog: https://github.com/shetabit/visitor/compare/v4.3.1...v4.4.0
Full Changelog: https://github.com/shetabit/visitor/compare/v4.2.0...v4.3.0
Full Changelog: https://github.com/shetabit/visitor/compare/v4.1.0...v4.2.0
Full Changelog: https://github.com/shetabit/visitor/compare/v4.0.1...v4.1.0
Full Changelog: https://github.com/shetabit/visitor/compare/v4.0.0...v4.0.1
Full Changelog: https://github.com/shetabit/visitor/compare/v3.1.4...v4.0.0
add except for routes to dont save request , dont store value of passwords without hash
now we support Laravel 7.*
Return empty string instead of null in userAgent()
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
This is the first release :)
How can I help you explore Laravel packages today?