| Package Data | |
|---|---|
| Maintainer Username: | Xety |
| Maintainer Contact: | zoro.fmt@gmail.com (Xety) |
| Package Create Date: | 2017-05-24 |
| Package Last Update: | 2025-03-10 |
| Home Page: | https://xetaravel.xeta.io |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-23 15:01:14 |
| Package Statistics | |
|---|---|
| Total Downloads: | 3,728 |
| Monthly Downloads: | 22 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
|Stable Version|Downloads|Laravel|License| |:-------:|:------:|:-------:|:-------:| |
|
|
|
|
A simple package that update an IP field when the user login into the application. Also work with the
remember_metoken.Requirement
Installation
composer require xetaio/xetaravel-iptraceableServiceProviders
Import the
IpTraceableServiceProviderin yourconfig/app.php:'providers' => [ //... Xetaio\IpTraceable\Providers\IpTraceableServiceProvider::class, //... ]Middleware
Import the
IpTraceablemiddleware in yourapp/Http/Kernel.phpin thewebpart:protected $middlewareGroups = [ 'web' => [ //... \Illuminate\Session\Middleware\StartSession::class, \Xetaio\IpTraceable\Http\Middleware\IpTraceable::class, //... ], //... ];Note : It's very important to import the middleware after the
Illuminate\Session\Middleware\StartSessionmiddleware, since this package use the session.Config file
Publish the package config file to your application :
php artisan vendor:publish --provider="Xetaio\IpTraceable\Providers\IpTraceableServiceProvider" --tag=configDatabase
Create 2 fields
last_login_ipandlast_login_date(optional) in your database :// Must be nullable $table->ipAddress('last_login_ip')->nullable(); $table->dateTime('last_login_date')->nullable(); // (optional) Disabled by defaultThe fields name can be changed in the configuration file.
Contribute
If you want to contribute to the project by adding new features or just fix a bug, feel free to do a PR.