Configuration
Remote Development Server Support
To allow the edit URL to be created properly, you should specify the following variables in your .env
file. Leave these empty if you are developing locally and are serving your site from the same filesystem you are editing on.
In the IGNITION_REMOTE_SITES_PATH
environment variable, you can specify the full path (not URL) to your projects or sites folder on your remote dev server, be this Homestead, Docker, or in the cloud .
In the IGNITION_LOCAL_SITES_PATH
environment variable, you can specify the full path (not URL) to your projects or sites folder as it resides on your local machine, the way your IDE or editor accesses the files.
Setting a version number
Optionally, you can configure Flare to add a version number to all sent exceptions. Typically this is done in a service provider.
use \Spatie\LaravelIgnition\Facades\Flare;
Flare::determineVersionUsing(function() {
return '1.0' ; // return your version number
};
Ignoring exceptions & errors
Ignition will always send all exceptions Laravel reported to Flare, when a Flare application is configured. You can change this behaviour by filtering the exceptions with a callable:
Flare::filterExceptionsUsing(
fn(Throwable $throwable) => !$throwable instanceof AuthorizationException
);
Additionally, you can provide a callable to the Flare::filterReportsUsing
method to stop a report from being sent to Flare. Compared to filterExceptionsCallable
, this can also prevent logs and errors from being sent.
Flare::filterReportsUsing(function(Report $report) {
// return a boolean to control whether the report should be sent to Flare
return true;
});
Finally, it is also possible to set the levels of errors reported to Flare as such:
Flare::reportErrorLevels(E_ALL & ~E_NOTICE); // Will send all errors except E_NOTICE errors