百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

lapse

> 后端框架
开源

Laravel 自主托管的小型错误跟踪系统,带有通知

174 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Laravel 自主托管的小型错误跟踪系统,带有通知

Introducing

Lapse provides a beautiful dashboard to track your errors in production without having to look up log file. Moreover it can notify you via Slack channel and Email alert. And moreover it can notify you via all of the channels from http://laravel-notification-channels.com/.

Lapse behind the scence depend on https://laravel.com/docs/5.6/notifications. It means theoretically Lapses can notify your error via over 30 ways including Slack, Email, Nexmo, Trello, Telegram, Facebook, Discord, Pusher, Twillo, Twitte. But I haven't test agaisnt all of the channels, If you find a bug, please submit an issue. If you want to know more, please kindly check the link.

For old version please see documentation at https://github.com/pyaesone17/lapse/tree/v1

Upgrade Guide

If you are upgrading from version 1.

Please delete config/lapse.php file first.

Install

Install Via Composer

bash
$ composer require pyaesone17/lapse

Publish vendor

bash
$ php artisan vendor:publish

Add slack hook url in config/lapse.php and define channels ( https://api.slack.com/incoming-webhooks )

php
    'channels' => [
        'slack' => 'https://hooks.slack.com/services/......',
        'mail' => '[email protected]'
    ],
    // Currently two notification channels supported
    // Those are slack and email
    // But you can use all of the notifications from http://laravel-notification-channels.com/
    // See the custom channel of my read me file to explore how to integrate
    'via' => ['slack']
bash
$ php artisan vendor:publish

Migrate lapses table

bash
php artisan migrate

Usage

after that register In the report method of App\Exceptions\Handler like this.

php

    use Pyaesone17\Lapse\ErrorNotifiable;
    ..
    
    class Handler extends ExceptionHandler
    {
        use ErrorNotifiable;
        ...
    
        public function report(Exception $exception)
        {
            if( app()->environment()!='local' ){ // Remove this line if you want lapse to notify in local environment
                $this->sendNotification($exception);
            }
        }
        ...  
    }

Laravel Lapse's dashboard is inspired by Laravel Horizon. Just like Horizon you can configure authentication to Lapse's dashboard. Add the following to the boot method of your AppServiceProvider. Here you could also check role permision and limit the dasboard.

php
    \Pyaesone17\Lapse\Lapse::auth(function($request) {
        // return true / false . For e.g.
        return \Auth::check();
    });

To view the dashboard point your browser to /lapse of your app. For e.g. laravel.dev/lapse. But the app is in local environment, lapse will not even attend to validate auth, It will display it all.

To delete all lapse message via cli , please run

bash
$ php artisan clear:lapse

Custom Notification Channel

you can use all notifications from http://laravel-notification-channels.com/ to integrate with lapse

For example, Telegram

install channel via composer

bash
    $ composer require laravel-notification-channels/telegram

configure the config/lapse.php first

php
    use NotificationChannels\Telegram\TelegramChannel;
    'channels' => [
        'slack' => 'https://hooks.slack.com/services/......',
        'telegram' => 'tele_gram_user_id', //optional
    ],
    // Currently two notification channels is supported built in
    // Those are slack and email
    'via' => ['slack', TelegramChannel::class]

register telegram provider

php
// config/app.php
'providers' => [
    ...
    NotificationChannels\Telegram\TelegramServiceProvider::class,
],

Set credentials

php
    // config/services.php
    'telegram-bot-api' => [
        'token' => env('TELEGRAM_BOT_TOKEN', 'YOUR BOT TOKEN HERE')
    ],

Add the formatter for notificaiton

…

New Feature

If you want new feature, feel free to submit as an issue

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

  • All Contributors

License

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

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPerror-reportingerror-trackinglarave-errorlaravel

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架