PHP code example of skyosev / login-activity-log

1. Go to this page and download the library: Download skyosev/login-activity-log 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/ */

    

skyosev / login-activity-log example snippets


$logs = LoginActivityRepository::getLatestLogs(100); // number of logs to get (leave empty to use the config value)

$logs = LoginActivityRepository::getLatestLoginLogs(100); // number of logs to get (leave empty to use the config value)

$logs = LoginActivityRepository::getLatestLogoutLogs(100); // number of logs to get (leave empty to use the config value)

$logs = LoginActivityRepository::cleanLog(30); // Offset in days
sh
php artisan vendor:publish --provider="Kiva\LoginActivity\LoginActivityServiceProvider" --tag="migrations"
php artisan migrate
sh
php artisan vendor:publish --provider="Kiva\LoginActivity\LoginActivityServiceProvider" --tag="config"
sh
php artisan login-activity:clean