定制 winnee0solta/laradblogger 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

winnee0solta/laradblogger

最新稳定版本:v1.0.1

Composer 安装命令:

composer require winnee0solta/laradblogger

包简介

Laravel Database Error Logger ( Crash Analytics )

README 文档

README

This package provides exception handler which stores errors in the database.

Installation

You can install the package via composer:

composer require winnee0solta/laradblogger

You need to publish and run the migrations with:

php artisan vendor:publish --tag="laradblogger-migrations"
php artisan migrate

(Optionally) You can also publish config with:

php artisan vendor:publish --tag="laradblogger-config"

It creates the config file (config/lapsi.php)

Usage

Logging exception to database with App/Exceptions/Handler.php: (Automatic)

use Winnee0solta\Laradblogger\LaradbloggerErrorHandler;

public function register()
{
    $this->reportable(function (Throwable $e) {
    if (class_exists(LaradbloggerErrorHandler::class)) {
            app(LaradbloggerErrorHandler::class)->report($e);
        }
    });
}

Logging exception to database via try-catch block: (Manual)

use Winnee0solta\Laradblogger\LaradbloggerErrorHandler;

try {
    // code that may throw an exception
} catch (Exception $e) {

    app(LaradbloggerErrorHandler::class)->report($e);
    throw $e;
}

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-23