PHP code example of tokenly / laravel-event-log

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

    

tokenly / laravel-event-log example snippets


use EventLog;

// log events
EventLog::debug('user.loggedIn', ['userId' => $user_id]);

// log exceptions
try {
    // do something here
} catch (Exception $exception) {
    EventLog::logError('action.failed', $e);
}