Run the install command to publish the Inspector.php configuration file in your application app/Config directory:
phpsparkinspector:install
Configure The Ingestion Key
Add the environment variable below to your .env file in order to make your application able to send data to your dashboard. You can get a new Ingestion Key by creating a new app in your account: https://app.inspector.dev
/**
* Setup how the exception handler works.
*/
class Exceptions extends BaseConfig
{
...
public function handler(int $statusCode, Throwable $exception): ExceptionHandlerInterface
{
InspectorExceptionHandler::handle($statusCode, $exception);
return new ExceptionHandler($this);
}
}
class Filters extends BaseFilters
{
/**
* List of filter aliases that are always
* applied before and after every request.
*
* @var array
*/
public array $globals = [
'before' => [
...,
'inspector',
],
'after' => [
...,
'inspector',
],
];
}