Skip to content

Conversation

@mpociot
Copy link
Contributor

@mpociot mpociot commented Aug 14, 2025

With Laravel Boost now being released, I thought it would be cool to also give the Laravel exception page a "boost".
This PR introduces a new "Copy as Markdown" button on the default exception view.

CleanShot 2025-08-14 at 12 21 04@2x

When clicking this button, we copy a markdown representation of the exception to the users clipboard, which can then be used for AI agents/LLMs.

The markdown contains all the information that is also visible on the page:

Exception title, class, message
PHP and Laravel Version
Request and route context
Application context

As these exceptions also happen in non-secure (http://) environments, like within Herd, I used the "old-school" way of copying the content to the clipboard, as navigator.clipboard requires HTTPS and would therefore fail locally.

@taylorotwell taylorotwell merged commit 4698035 into laravel:12.x Aug 14, 2025
60 checks passed
@taylorotwell
Copy link
Member

Thanks!

@mreduar
Copy link

mreduar commented Aug 20, 2025

@freekmurze I've been waiting for this feature in Flare for a long time. It would be great to have it.

@mreduar
Copy link

mreduar commented Aug 20, 2025

It would be great to have this in Nightwatch as well, @taylorotwell 😊

marventhieme added a commit to marventhieme/laravel-error-share that referenced this pull request Aug 26, 2025
With Laravel 12.25 we got the new "Copy as Markdown" button in the exception page: laravel/framework#56657 This change includes this button but only if the component exists, making it fail safe for <12.25 laravel versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants