PHP code example of mymuns / activity-log

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

    

mymuns / activity-log example snippets


'storage' => env('ACTIVITY_LOG_STORAGE', 'database'), // database, file, logstash, elasticsearch, sentry

'channels' => [
    'database',
    'daily',
    'logstash',
    'loki',
    'sentry',
    'elasticsearch',
],

'api' => [
    \ActivityLog\Middleware\LogRequestResponseMiddleware::class,
    'throttle:api',
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
],

use ActivityLog\Traits\LogsModelActivity;

class Post extends Model
{
    use LogsModelActivity;

    protected $logAttributes = ['title', 'content'];
}
bash
php artisan vendor:publish --provider="ActivityLog\ActivityLogServiceProvider"
php artisan vendor:publish --tag=activitylog-migrations
bash
php artisan activitylog:revert {id}