承接 skyosev/login-activity-log 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

skyosev/login-activity-log

最新稳定版本:1.0.3

Composer 安装命令:

composer require skyosev/login-activity-log

包简介

Track users login activity for Laravel 5.5+

README 文档

README

This package will subscribe for login and logout events and will log data every time they are fired. The log target can be the database or the default Laravel log handler.

Requirements

Laravel Framework > 5.5

Installation

In terminal

composer require skyosev/login-activity-log

Publish migrations

php artisan vendor:publish --provider="Kiva\LoginActivity\LoginActivityServiceProvider" --tag="migrations"
php artisan migrate

Optionally publish config

php artisan vendor:publish --provider="Kiva\LoginActivity\LoginActivityServiceProvider" --tag="config"

Usage

Once installed, the package will begin to store logs automatically in the appropriate target (database by default). There is also a simple repository implementation with several methods for logs retrieval from database. You can use the Kiva\LoginActivity\Facades\LoginActivityRepository facade to access them:

Get latest logs

$logs = LoginActivityRepository::getLatestLogs(100); // number of logs to get (leave empty to use the config value)

Get latest login logs

$logs = LoginActivityRepository::getLatestLoginLogs(100); // number of logs to get (leave empty to use the config value)

Get latest logout logs

$logs = LoginActivityRepository::getLatestLogoutLogs(100); // number of logs to get (leave empty to use the config value)

Clean log

$logs = LoginActivityRepository::cleanLog(30); // Offset in days

Clean the log from terminal

php artisan login-activity:clean

Credits

License

MIT - http://opensource.org/licenses/MIT

统计信息

  • 总下载量: 1.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-26