wamesk / laravel
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/wamesk/laravel
Requires
- laravel/framework: ^10.0|^11.0|^12.0
README
Installation
composer require wamesk/laravel
Usage
ExceptionHandler
When using wamesk/laravel  package or WameException exception you need to register this ExceptionHandler.
// bootstrap/app.php ->withExceptions(function (Exceptions $exceptions) { ... $exceptions->render(resolve(ExceptionHandler::class)); ... })->create();
WameException
Was created to be used with ExceptionHandler for custom frontend response, can be used anywhere in project.
Code in WameException will be used as status code.
Message will be used as code and will be put in translator __($exception->getMessage()) for message.
Response example
{
    "code": "1.1",
    "message": "Error message"
}