PHP code example of lattaai / latta-laravel-recorder

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

    

lattaai / latta-laravel-recorder example snippets


->withExceptions(function (Exceptions $exceptions) {
    $exceptions->report(function (Throwable $e) {
        $lattaRecorder = new LattaLaravelRecorder(env('LATTA_API_KEY'));
        $lattaRecorder->reportError($e);
    });
})->create();

public function boot(): void
{
    $lattaRecorder = new LattaLaravelRecorder(env('LATTA_API_KEY'));
    $lattaRecorder->startRecording("Laravel", app()->version(), PHP_OS, "en", "server");
}