Download the PHP package timezhero/laravel-rfc9457 without Composer

On this page you can find all versions of the php package timezhero/laravel-rfc9457. 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-rfc9457

Laravel RFC 9457

A Laravel package that standardizes API error responses using the RFC 9457 Problem Details specification. Exceptions opt in via a trait and PHP attributes — no base class required, no HTTP coupling on your domain exceptions.

Installation

Requires PHP 8.4+ and Laravel 11+.

The service provider is auto-discovered.

Quick start

1. Register the handler in bootstrap/app.php:

2. Scaffold an exception:

3. Throw it:

Response (409, application/problem+json):

Validation errors (with errors), authentication (401), HTTP exceptions, and generic 5xx are also wrapped automatically. 5xx responses never include the exception message.

CLI

Command What it does
php artisan make:problem-exception {name} Creates exception class + translation entry + documentation view
php artisan vendor:publish --tag=rfc9457-config Publish config
php artisan vendor:publish --tag=rfc9457-views Publish views to customize the docs layout

Advanced

Manual exception

Translations

Convention-based in lang/{locale}/exceptions.php:

The key is always the snake_cased class name without Exception. Falls back to the raw #[Problem] title if no translation exists.

Documentation pages

Each exception gets a page at {route_prefix}/{slug} (default /problems/{slug}). Add a description view at resources/views/vendor/rfc9457/details/{slug}.blade.php. Extensions and metadata are rendered automatically.

Configuration


All versions of laravel-rfc9457 with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
laravel/framework Version >=11.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 timezhero/laravel-rfc9457 contains the following files

Loading the files please wait ...