PHP code example of laraveleg / user-online

1. Go to this page and download the library: Download laraveleg/user-online library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

laraveleg / user-online example snippets


\LaravelEG\Laravel\Middleware\UserOnlineMiddleware::class

use LaravelEG\Laravel\Traits\UserOnline;

class User extends Authenticatable
{
    use UserOnline;
    ...

Auth::user()->isOnline();