PHP code example of douglasanpa / active-users

1. Go to this page and download the library: Download douglasanpa/active-users 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/ */

    

douglasanpa / active-users example snippets


php artisan session:table

php artisan migrate

// Import at the top
use Active;


// Find latest users
$users = Active::users()->get();

// Loop through and echo user's name
foreach ($users as $activity) {
    echo $activity->user->name . '<br>';
}