lattaai / latta-laravel-recorder
Latta Laravel Recorder
1.0.4
2024-10-21 20:51 UTC
Requires
- php: >=5.0
- illuminate/support: ^11.27
- lattaai/latta-php-recorder: ^1.0
This package is auto-updated.
Last update: 2025-03-21 21:51:23 UTC
README
To implement Latta into Laravel backend do:
- Install Latta Recorder via Composer
composer require lattaai/latta-laravel-recorder
- Insert API Key into ENV File
LATTA_API_KEY=xyz
- Add lines to bootstrap/app.php into withExceptions() function
->withExceptions(function (Exceptions $exceptions) {
$exceptions->report(function (Throwable $e) {
$lattaRecorder = new LattaLaravelRecorder(env('LATTA_API_KEY'));
$lattaRecorder->reportError($e);
});
})->create();
- Add lines to app/providers/AppServiceProvider.php into boot function
public function boot(): void
{
$lattaRecorder = new LattaLaravelRecorder(env('LATTA_API_KEY'));
$lattaRecorder->startRecording("Laravel", app()->version(), PHP_OS, "en", "server");
}