PHPackages                             aliirfaan/citronel-error-catalogue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. aliirfaan/citronel-error-catalogue

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

aliirfaan/citronel-error-catalogue
==================================

Maintain an error catalogue code to display in error messages for better error reporting and support.

2.1.0(1mo ago)0581MITPHPPHP &gt;=8.0.0

Since Nov 27Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/aliirfaan/citronel-error-catalogue)[ Packagist](https://packagist.org/packages/aliirfaan/citronel-error-catalogue)[ RSS](/packages/aliirfaan-citronel-error-catalogue/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (1)

Citronel error catalogue
========================

[](#citronel-error-catalogue)

A catalogue of errors to use in your Laravel project that uses a standard format. This can be useful for customer support staff and to perform further analysis of errors after logging.

Features
--------

[](#features)

- A catalogue of errors modelled in the following format: \[main-process code\]-\[sub-process code\]-\[event code\]
- General error codes for validation, authentication
- Commands to dump error codes and messages in CSV

Requirements
------------

[](#requirements)

- [Composer](https://getcomposer.org/)
- [Laravel](http://laravel.com/)

Installation
------------

[](#installation)

- Install the package using composer:

```
 $ composer require aliirfaan/citronel-error-catalogue
```

- Publish files with:

```
 $ php artisan vendor:publish --provider="aliirfaan\CitronelErrorCatalogue\CitronelErrorCatalogueProvider"
```

or by using only `php artisan vendor:publish` and select the `aliirfaan\CitronelErrorCatalogue\CitronelErrorCatalogueProvider` from the outputted list.

Configuration
-------------

[](#configuration)

This package publishes two configuration files. Please view configuration files for documentation.

- citronel-general-error-catalogue.php - the error catalogue
- citronel-error-config.php - package configuration

Commands
--------

[](#commands)

- Dump error catalogue in CSV

```
 $ php artisan citronel:error-catalogue:dump {filename=error-catalogue.csv} {folder=error-catalogue}
```

- Dump messages in CSV

```
 $ php artisan citronel:messages:dump {filename=messages.csv} {folder=messages}
```

Traits
------

[](#traits)

- ErrorCatalogue.php

Usage
-----

[](#usage)

### Add external configurations

[](#add-external-configurations)

- Add configuration file names in 'citronel\_error\_catalogue\_external\_catalogues' =&gt; \[\]
- Example: 'citronel\_error\_catalogue\_external\_catalogues' =&gt; \['first-config, 'second-config'\]
- **The exteral configuration must be the same format as general error catalogue.**

### Code usage

[](#code-usage)

```
