1. Go to this page and download the library: Download aledaas/loggerdb 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/ */
aledaas / loggerdb example snippets
use Aledaas\LoggerDB\Models\ProcessLog;
ProcessLog::create([
'process' => 'OrderProcessing', // The name of the process
'step' => 'ValidateOrder', // The current step in the process
'level' => 'error', // Log level: e.g. info, warning, error
'outcome' => 'failed', // Outcome of the step: e.g. success, failed
'message' => 'Order ID 1234 failed validation.', // Descriptive message
'context' => ['order_id' => 1234, 'user_id' => 5678], // Additional context data
]);