定制 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
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固