Download the PHP package jftecnologia/laravel-exceptions without Composer

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

Laravel Exceptions

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Advanced exception management system for Laravel with enriched context, multiple logging channels, and customized user-facing messages.

Features

Installation

Quick Install (Recommended)

Run the interactive installation command:

This will guide you through publishing assets, migrations, configuration, and running migrations.

After installation, you must register the exception handler in your bootstrap/app.php file:

Note: The LaravelException::handles() call must be placed as the last handler in the withExceptions method to ensure it properly catches all exceptions.

Manual Installation

Important: You must publish the package assets and migrations before using it:

Optionally, publish configuration (if you want to customize it):

Optionally, publish views (if you want to customize them):

After publishing, you must register the exception handler in your bootstrap/app.php file:

Note: The LaravelException::handles() call must be placed as the last handler in the withExceptions method to ensure it properly catches all exceptions.

Usage

Creating Custom Exceptions

Use the artisan command to generate exception classes:

This creates a new exception class in app/Exceptions/PaymentFailedException.php.

Throwing Exceptions

HTTP Exceptions

Available classes: BadRequestHttpException, UnauthorizedHttpException, AccessDeniedHttpException, NotFoundHttpException, MethodNotAllowedHttpException, SessionExpiredHttpException, UnprocessableEntityHttpException, TooManyRequestsHttpException, InternalServerErrorHttpException, ServiceUnavailableHttpException, GatewayTimeoutHttpException.

Cleaning Old Exception Records

Use the clean command to remove old exception records from the database:

The retention period defaults to 365 days but can be configured via the delete_records_older_than_days setting.

Recommended: Schedule this command to run daily by adding it to your routes/console.php:

Configuration

Main options in config/laravel-exceptions.php:

Configuration Options

Option Default Description
view laravel-exceptions::error Blade view used for displaying exceptions
convert_exceptions true Convert unhandled exceptions to AppException automatically
render_in_debug false Render custom exception views even when APP_DEBUG=true
delete_records_older_than_days 365 Number of days to retain exception records (used by clean command)
context_providers Array Classes that provide additional context for exceptions
channels Array Storage channels for logging exceptions
channels_settings Array Channel-specific configuration options
ignored_exceptions Array Exception classes that should not be logged or converted
http_exceptions Array Mapping of HTTP status codes to exception classes

Automatic Context

The package automatically collects:

Database Storage

Exceptions are automatically saved to the exceptions_log table with all relevant fields, making analysis and debugging easier.

Testing

Credits

License

MIT License. See LICENSE.md for details.


All versions of laravel-exceptions with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/support Version ^12.0
illuminate/contracts Version ^12.0
illuminate/database Version ^12.0
illuminate/console Version ^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 jftecnologia/laravel-exceptions contains the following files

Loading the files please wait ...