The main goal of Flare is to be the best error tracker for Laravel applications. Since we started, many people are asking how they can use Flare with other PHP applications that they run and how this works. For this purpose, we released a plain PHP SDK that also powers Flares Laravel client Ignition under the hood.
In this article, we are using Flare to track errors in a Laravel Lumen application.
At first, you need to create a new project at Flare to get your Flare application key and access the Flare API. You can do this on your project overview here.
The second step is to install the Flare PHP client package via composer:
composer require facade/flare-client-php
The next step is to make sure that you are loading the default AppServiceProvider in Lumen. The service provider is not loaded by default, but you can do that by uncommenting line 79in the bootstrap/app.php in your Lumen project directory. It should look like this:
$app->register(App\Providers\AppServiceProvider::class);
The last step is to send all errors from your Lumen application to Flare. This is quite simple and works by registering the Flare handlers within the AppServiceProvider. For a default Lumen install, it looks like this:
<?php
namespace App\Providers;
use Facade\FlareClient\Flare;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
Flare::register('ZHb7j15RDQ1adLHjXSNWdsinSu1dhyMr')->registerFlareHandlers();
}
}
Make sure you use your own APP_KEY and do not add the key directly in the file as this file is version controlled, and you don't want to have credentials in there. A better practice is to add this key to the .env file.
Continue reading
Why we removed AI solutions from Flare
AI generated solutions are dead, long live AI generated solutions! We removed the old one-shot fixes from a model that could only see the stack trace. It simply couldn't compete with modern agentic AI. In their place, Flare works with the agentic AI tools you already use: an MCP server that handles real triage, a CLI with an agent skill, quick Copy for AI prompts in the UI and docs served as markdown. Hosted agents are in the works too.
Alex
Flare now uses OAuth for MCP, the CLI, and API
Connect MCP clients like Claude and Cursor to Flare by logging in from your browser, no more copying API tokens. Every connection gets its own permissions, so you can give your AI read-only access to a single project. The CLI signs in the same way, and new personal access tokens with scopes and expiry cover scripts and CI.
Alex
Subscribe to Backtrace, our quarterly Flare newsletter
No spam, just news & product updates