wamesk/core

Maintainers

Package info

github.com/wamesk/core

pkg:composer/wamesk/core

Statistics

Installs: 265

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2024-06-03 10:25 UTC

This package is auto-updated.

Last update: 2026-03-01 00:49:47 UTC


README

Installation

composer require wamesk/core

Usage

ExceptionHandler

When using wamesk/laravel-auth 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 __() for message

Response example

{
    "code": "examplecode",
    "message": "examplemessagee"
}