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_me
token.composer require xetaio/xetaravel-iptraceable
Import the
IpTraceableServiceProvider
in yourconfig/app.php
:'providers' => [ //... Xetaio\IpTraceable\Providers\IpTraceableServiceProvider::class, //... ]Import the
IpTraceable
middleware in yourapp/Http/Kernel.php
in theweb
part: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\StartSession
middleware, since this package use the session.Publish the package config file to your application :
php artisan vendor:publish --provider="Xetaio\IpTraceable\Providers\IpTraceableServiceProvider" --tag=config
Create 2 fields
last_login_ip
andlast_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.
If you want to contribute to the project by adding new features or just fix a bug, feel free to do a PR.
-
Notifications
You must be signed in to change notification settings - Fork 0
Update an IP field when the user login into the application with @laravel.
License
XetaIO/Xetaravel-IpTraceable
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Update an IP field when the user login into the application with @laravel.
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published