承接 highideas/laravel-users-online 相关项目开发

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

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

highideas/laravel-users-online

最新稳定版本:3.0.1

Composer 安装命令:

composer require highideas/laravel-users-online

包简介

This package will provide an online users management.

README 文档

README

Latest Stable Version Total Downloads License Build Status Codacy Badge Codacy Badge StyleCI

Laravel compatibility

Laravel Package
6.x.x 3.0.x
5.8.x 3.0.x
5.7.x 2.3.x
5.6.x 2.3.x
5.5.x 2.3.x
5.4.x 2.2.x
5.3.x 2.0.x
5.2.x 1.0.x

Installation

Add the new required package in your composer.json

"highideas/laravel-users-online": "^3.0"

Run composer update or php composer.phar update.

Or install directly via composer

composer require highideas/laravel-users-online

After composer command, add the trait in your model User in app/User.php:

class User extends Authenticatable
{
    use \HighIdeas\UsersOnline\Traits\UsersOnlineTrait;
...

Finally run php artisan vendor:publish for add the namespaces

Usage

For show the users online just use the method allOnline():

$user = new User;
$user->allOnline();

Or if you want to check if a specific user is online use the method isOnline():

$user = User::find($id);
$user->isOnline();

You can sort all users online with the methods mostRecentOnline() and leastRecentOnline():

$user = new User;
$user->mostRecentOnline();
$user->leastRecentOnline();

Using with Real-time Facades:

use Facades\App\User as UserFacade;

UserFacade::mostRecentOnline();
UserFacade::leastRecentOnline();

Installation and usage on last versions of framework:

Laravel 5.5 - 5.7

Laravel 5.4

Laravel 5.3

Laravel 5.2

统计信息

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

GitHub 信息

  • Stars: 199
  • Watchers: 6
  • Forks: 43
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-04-13