Flare by Spatie
  • Features
  • Pricing
  • Docs
  • Blog
  • LOG IN
  • START TRACKING
  • Home
  • Features
  • Pricing
  • Docs
  • Blog
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript
  • General
  • Introduction
  • Installation
  • Censoring collected data
  • Ignoring collected data
  • Laravel Octane
  • Errors
  • Adding custom context
  • Customising error grouping
  • Handling errors
  • Linking to errors
  • Reporting errors
  • Sending logs to Flare
  • Performance
  • Introduction
  • Sampling
  • Limits
  • Modify spans and span events
  • Data Collection
  • Application info
  • Cache events
  • Console commands
  • Customise error report
  • Database transactions
  • Dumps
  • Errors when tracing
  • Exception context
  • External http requests
  • Filesystem operations
  • Git information
  • Glows
  • Identifying users
  • Jobs and queues
  • Laravel context
  • Livewire
  • Logs
  • Queries
  • Redis commands
  • Requests
  • Server info
  • Solutions
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Laravel Flare V1
  • Ignition

Linking to errors

Laravel will show this error page by default when an error occurs in a web request.

screenshot

If a user sees this page and wants to report this error to you, the user usually only reports the URL and the time the error was seen.

You can display the UUID of the error sent to Flare to help your users pinpoint the error they saw.

If you haven't already done so, you can publish Laravel's default error pages (https://laravel.com/docs/12.x/errors#custom-http-error-pages) with this command.

php artisan vendor:publish --tag=laravel-errors

Typically, you would alter the resources/views/errors/500.blade.php to display the UUID and, optionally, a URL of the latest error sent to Flare.

@verbatim
@extends('errors::minimal')

@section('title', __('Server Error'))
@section('code', '500')
@section('message')
    Server error
+    <div>
+        <a href="{{ Flare::sentReports()->latestUrl() }}">
+            {{ Flare::sentReports()->latestUuid() }}
+        </a>
+    </div>
@endsection
@endverbatim

This is how it would look in the browser.

screenshot

The link returned by Flare::sentReports()->latestUrl() isn't publicly accessible; the page is only visible to Flare users who have access to the project on Flare.

Sometimes, multiple errors can be reported to Flare in a single request. To get a hold of the UUIDs of all sent errors, you can call Flare::sentReports()->uuids(). You can get links to all sent errors with Flare::sentReports()->urls().

It is possible to search for specific errors in Flare using the UUID; you can find more information about that here.

Handling errors Reporting errors

Monitor your web apps and sites from errors to slowdowns with Flare, the easiest application monitoring platform for Laravel, PHP & Javascript.

  • Platform
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Support
  • Resources
  • Blog
  • Changelog
  • Documentation
  • Affiliate program
  • Service status
  • Terms of use
  • DPA
  • Privacy & Cookie Policy
Flare