Remember and track IPs of Laravel users.
You can install the package via composer:
composer require devworkout/laravel-user-ips
Add a HasIPs trait to your User model:
use \DevWorkout\UserIps\HasIPs;
Associate IP with user:
$user->rememberIP('127.0.0.1');
Get a list of associated IPs:
$ips = $user->ips()->pluck('ip');
Find IPs used by multiple users:
$ips = UserIP::withMultipleUsers()->get();
Find users using this IP:
$users = $ip->users();
Automatic IP recording is enabled on login.
composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email us instead of using the issue tracker.
Give us a star!
The MIT License (MIT). Please see License File for more information.