Skip to content

wamesk/laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Package for core utilities to be used in multiple packages

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"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages