You can also use Flare in combination with non-Laravel PHP projects.
To get started, require the Flare PHP client as a dependency in your PHP project:
composer require facade/flare-client-php
Sending errors to Flare
If you want to send errors to Flare, you must specify a valid API key when registering the generic Flare client. You can get an API key when creating a new project or by visiting an existing project's settings screen.
To tell Flare to report all unhandled errors and exception, register the Flare PHP client and give it your API key:
$flare = Flare::register('YOUR-API-KEY')
This will bind Flares exception and error handler and Flare is set up and ready to go.
Ignoring exceptions & error
The Flare client will always send all exceptions to Flare, you can change this behaviour by filtering the exceptions with a callable:
fn(Throwable $throwable) => !$throwable instanceof AuthorizationException
It is possible to set the levels of errors reported to Flare as such:
$flare->reportErrorLevels(E_ALL & ~E_NOTICE);