PHP code example of webqamdev / activity-logger

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

    

webqamdev / activity-logger example snippets


class User extends Model {

    /**
     * The attributes that shouldn't be logged in activity logger.
     * 
     * @var array 
     */
    public $logAttributesToIgnore = [
        'password',
        'phone',
    ];

     ...
}

'channel' => [
    'path'       => storage_path('logs/activity.log'),
    'level'      => 'debug',
    'days'       => 14,
    'permission' => 0644, // Default value, equivalent to bash's rw-r--r--
],
bash
php artisan vendor:publish --provider="Spatie\Activitylog\ActivitylogServiceProvider" --tag="activitylog-migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Webqamdev\ActivityLogger\ActivityLoggerServiceProvider" --tag="config"
bash
php artisan vendor:publish --provider="Webqamdev\ActivityLogger\ActivityLoggerServiceProvider" --tag="config"