Download the PHP package kolakachi/laravel-error-explainer without Composer

On this page you can find all versions of the php package kolakachi/laravel-error-explainer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-error-explainer

Laravel Error Explainer

Turn Laravel exceptions into two things, automatically:

  1. A dev message — what broke, where, and a suggested fix, grounded in your actual stack trace and code.
  2. A user message — a calm, non-technical sentence safe to show on your 500 page.

Bring your own LLM key (OpenAI, Anthropic), point OpenAI at an OpenAI-compatible endpoint, or run fully local with Ollama. Output in any language.

Install

Set your driver and key in .env:

That's it. The package hooks your exception handler via reportable(). When an exception is reported in an enabled environment, the explanation is generated (cached by error signature) and written to your log. In queue mode the package serializes a scrubbed payload and dispatches a real queued job instead of blocking the request:

In sync mode, the current explanation is also shared with the view layer by default:

If you want the package to render its own simple HTML error page for server-side exceptions, enable:

The built-in page can also show the developer explanation while APP_DEBUG=true, or you can force it on with:

Manual use

Error Page Integration

For a custom Laravel error page, you can render the current safe message with the built-in component:

You can also read the shared view data directly if you prefer:

With ERROR_EXPLAINER_RENDER_ERROR_PAGE=true, the package can also return its own built-in HTML error page for non-JSON 5xx responses. The page renders even when no explanation is available (for example in production, where explanations are gated off, or if the LLM call fails) — it falls back to the view.fallback_message config value and hides the developer panel. So you can use it as a plain branded 500 page and let the AI message fill in wherever explanations run.

Custom LLM providers

Then set ERROR_EXPLAINER_DRIVER=gemini.

If your provider exposes an OpenAI-compatible API, you can often use the built-in openai driver instead:

Privacy

Before anything is sent to a provider, the payload passes through a regex scrubber (scrub_patterns in config) that redacts passwords, bearer tokens, API keys, and emails by default. Add your own patterns. For zero data egress, use the ollama driver — inference stays on your machine.

Cost control

Explanations are cached by exception signature (class + file + line + normalized message), so an exception firing 10,000 times in a hot loop costs you one LLM call. Numeric IDs in messages are normalized, so User 42 not found and User 99 not found share a cache entry.

Filtering

Skip noisy or intentional exceptions with except, and by default anything implementing Laravel's ShouldntReport contract is ignored automatically:

Testing

Built for Orchestra Testbench + Pest:

License

MIT


All versions of laravel-error-explainer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
illuminate/cache Version ^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kolakachi/laravel-error-explainer contains the following files

Loading the files please wait ...