Flare Error tracking made for Laravel
Features Pricing Docs Blog Log in Start free trial Free trial
  • Docs
  • Videos

Documentation

  • General

    • Welcome
    • Projects
    • Errors
    • Error occurrences
    • Using the API
    • Sharing error occurrences
    • Spike protection
    • GitHub integration
  • Ignition for Laravel

    • Installation
    • Configuration
    • Security
    • Controlling collected data
    • Sending logs to Flare
    • Linking to errors
    • Identifying users
    • Adding custom context
    • Adding glows
    • Writing custom middleware
  • Flare for generic PHP projects

    • Installation
    • Controlling collected data
    • Identifying users
    • Linking to errors
    • Adding custom context
    • Adding glows
    • Writing custom middleware
  • Javascript error tracking

    • Installation
    • Framework integrations
    • Resolving Bundled Code
    • Reporting errors
    • Client hooks
    • Adding custom context
    • Adding glows
    • Solution Providers
  • Solutions

    • Introduction
    • Adding custom solutions
    • Making solutions runnable
    • Using solution providers
    • Writing good solutions
  • Notifications

    • Configuring notifications
    • Mail
    • Slack
    • Telegram
    • SMS
    • Webhooks
    • Discord
    • Microsoft Teams
  • Team management

    • Using multiple teams
    • Subscribing to a plan
    • Receiving invoices
    • Managing team members
    • Inviting guests to projects

Linking to errors

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

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.

To let your users pinpoint the exact error they saw, you can display the UUID of the error sent to Flare.

If you haven't already done so, you can publish Laravel's default 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.

@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

This is how that would look like in the browser.

screenshot

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

In certain cases, 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().

Previous topic Next topic

About Flare

  • Home
  • Features
  • Pricing
  • Support

Resources

  • Blog
  • Changelog
  • Docs
  • Ignition

App

  • Log in
  • Start free trial
SPATIE
  • Service status
  • Terms of use
  • Privacy & cookie policy