Laravel 扩展包 - laravel/telescope 代码调试助手

作者: 温新

分类: 【Laravel 扩展包】

阅读: 1018

时间: 2022-12-11 11:11:13

hi,我是温新,一名 PHPer

Laravel Telescope 是 Laravel 框架的优雅调试助手。Telescope 可深入了解进入应用程序的请求,异常,日志条目,数据库查询,排队作业,邮件,通知,缓存操作,计划任务,变量转储等。Telescope 是您本地 Laravel 开发环境的绝佳伴侣。

注意:生产环境不用

1、安装

composer require laravel/telescope

2、执行迁移文件

php artisan telescope:install
 
php artisan migrate

3、只在开发环境中运行

// App\Providers\AppServiceProvider.php

public function register()
{
    if ($this->app->environment('local')) {
        $this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
        $this->app->register(TelescopeServiceProvider::class);
    }
}

4、使用

http://laravel-ziruchu.test/telescope/requests
请登录后再评论