承接 salfade/laravel-login-tracker 相关项目开发

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

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

salfade/laravel-login-tracker

最新稳定版本:0.0.8

Composer 安装命令:

composer require salfade/laravel-login-tracker

包简介

A simple package to track users successful login attempts

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

This simple package let's you track your user login activity. Track their IPs to give you better visibility to see user activity.

Support us

Buy us Coffee?

Installation

composer require salfade/laravel-login-tracker

Publish and run the migrations with:

php artisan vendor:publish --provider="Salfade\LoginTracker\LoginTrackerServiceProvider" --tag="migrations"
php artisan migrate

Next, add the Salfade\LoginTracker\Traits\HasLoginAttempts trait to your User Model.

    use Salfade\LoginTracker\Traits\HasLoginAttempts;

Usage

Retrieving the latest successful login attempt

$userLastSuccessfulLogin = User::find($id)->latestLoginAttempt();
echo $userLastSuccessfulLogin->ip_address;
echo $userLastSuccessfulLogin->created_at;

Retrieving all the successful login attempts

$userLastSuccessfulLogin = User::find($id)->loginAttempts();

Retrieving the IP address of last successful login attempt

$userLastSuccessfulLogin = User::find($id)->lastLoginIp();

Retrieving the timestamp of last successful login attempt

$userLastSuccessfulLogin = User::find($id)->lastLoginDate();

Retrieving the human friendly date for last successful login attempt

$userLastSuccessfulLogin = User::find($id)->lastLoginDateForHuman();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email admin@salfade.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固