Looking to hire Laravel developers? Try LaraJobs

laravel-kepoh-webapi maintained by myopensoft

Description
To send error that been triggered by exception to WebAPI channels for internal error logging purpose.
Last update
2024/03/12 02:18 (dev-master)
License
Downloads
83

Comments
comments powered by Disqus

laravel-kepoh-webapi

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.