PHP code example of endritvs / user-logs

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

    

endritvs / user-logs example snippets


    protected $routeMiddleware = [
        // ... other middleware ...
        'track.user.log' => \Endritvs\UserLogs\Middleware\TrackUserLogMiddleware::class,
    ];
    

    Route::middleware('track.user.log')->group(function () {
        // ... your routes ...
    });
    

    'user_logs' => [
        'driver' => 'custom',
        'via' => Endritvs\UserLogs\TrackUserLog::class,
    ]
    

    Log::channel('user_logs')->info('User performed a specific action.');