In order to create ip record.Depends on jenssegers/agent package.
composer require zykutil/record-ip
providers add
ZYKUtil\RecordIp\RecordIpServiceProvider::class
alias add
'RecordIp' => ZYKUtil\RecordIp\RecordIpFacade::class
php artisan vendor:publish --tag=zykutil-recordip --ansi --force
RI_DB_CONNECTION=mysql
RI_DEFAULT_TABLE=system_request_ip_records
php artisan ri:table
use ZYKUtil\RecordIp\Factory\AbstractRecordIp;
class FooType extends AbstractRecordIp
{
public function __construct()
{
parent::__construct();
$this->type = 'foo';
}
}
'types' => [
'foo' => FooType::class
]
\RecordIp::setActor('foo')->success("ask success");
\RecordIp::setActor('foo')->fail("ask fail");