Logs - WaZeR-Adrien/Lightwork-api GitHub Wiki

How to add event in logs ?

You must create an instance of the Logs class and use the save() method :

// Create new log
$log = new Log($code, $key, $date, $status, $method, $endpoint, $ip);

// Save in logs
$log->save();

How to get logs ?

  • public static function getAll() : get all logs
  • public static function getByMethod() : get logs by method
  • public static function getByDate() : get logs by date
  • public static function getByMethodAndDate() : get logs by method and by date