komicho / laravel-user-online
There is no license information available for the latest version (1.2) of this package.
Analyze packages within the project
1.2
2021-08-23 06:47 UTC
Requires (Dev)
- nunomaduro/phpinsights: ^2.0
This package is auto-updated.
Last update: 2024-10-29 23:33:28 UTC
README
Define the status of the user that was online or otherwise.
Install via composer
Add orm to composer.json configuration file.
$ composer require laraveleg/user-online
add new middleware in app/Http/Kernel.php
file
\LaravelEG\Laravel\Middleware\UserOnlineMiddleware::class
add the trait in your model User in app/User.php
file
use LaravelEG\Laravel\Traits\UserOnline; class User extends Authenticatable { use UserOnline; ...
Functions
isOnline
Auth::user()->isOnline();
THX.