PHP code example of dnj / laravel-user-logger

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

    

dnj / laravel-user-logger example snippets


$logger = app(dnj\UserLogger\Contracts\ILogger::class);
$log = $logger
	->performedOn($anEloquentModel)
	->causedBy($user)
	->withProperties(['customProperty' => 'customValue'])
	->log('edit');
bash
php artisan migrate
bash
php artisan vendor:publish --provider="dnj\UserLogger\ServiceProvider" --tag="config"