PHP code example of threls / activity-log

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

    

threls / activity-log example snippets


return [

    'enabled' => env('ACTIVITY_LOG_ENABLED', true),

    'log_events' => [
        'on_create' => true,
        'on_update' => true,
        'on_delete' => true,
        'on_login' => true,
    ],

    'user_model' => '\App\Models\User',

    'log_pagination' => 20,

    'api_route_middleware' => 'auth:sanctum',

];
bash
php artisan vendor:publish --tag="activity-log-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="activity-log-config"