myopensoft/laravel-kepoh-webapi

To send error that been triggered by exception to WebAPI channels for internal error logging purpose.

1.0.3 2024-03-12 01:18 UTC

This package is auto-updated.

Last update: 2024-09-12 02:20:53 UTC


README

Latest Version on Packagist Total Downloads

To send error that been triggered by exception to WebAPI channels for internal error logging purpose.

Installation

You can install the package via composer:

composer require myopensoft/laravel-kepoh-webapi

You can publish the config file with:

php artisan vendor:publish --provider="Myopensoft\KepohTelegram\KepohWebapiServiceProvider" --tag="kepoh-webapi-config"

This is the contents of the published config file:

return [
    'webapi' => [
        'enable' => env('KEPOH_WEBAPI_ENABLE', false),
        'access_token' => env('KEPOH_WEBAPI_ACCESS_TOKEN'),
        'server_token' => env('KEPOH_WEBAPI_SERVER_TOKEN'),
        'dont_report' => [
            \Illuminate\Auth\AuthenticationException::class,
            \Illuminate\Auth\Access\AuthorizationException::class,
            \Illuminate\Session\TokenMismatchException::class,
            \Illuminate\Validation\ValidationException::class,
        ]
    ]
];

Usage

Put into Handler.php

public function report(Throwable $exception)
{
    // ...
    
    KepohWebapi::report($exception);

    parent::report($exception);
}

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.