PHP code example of xetaio / xetaravel-iptraceable
1. Go to this page and download the library: Download xetaio/xetaravel-iptraceable library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
xetaio / xetaravel-iptraceable example snippets
> 'providers' => [
> //...
> Xetaio\IpTraceable\Providers\IpTraceableServiceProvider::class,
> //...
> ]
>
> protected $middlewareGroups = [
> 'web' => [
> //...
> \Illuminate\Session\Middleware\StartSession::class,
> \Xetaio\IpTraceable\Http\Middleware\IpTraceable::class,
> //...
> ],
> //...
> ];
>
> // Must be nullable
> $table->ipAddress('last_login_ip')->nullable();
> $table->dateTime('last_login_date')->nullable(); // (optional) Disabled by default
>