laravel开发调试工具laravel-debugbar的安装

一、使用 Composer 安装该扩展包

composer require barryvdh/laravel-debugbar --dev

二、(可选)修改配置文件app/config.php

Laravel 5.5使用Package Auto-Discovery,因此不需要您手动添加ServiceProvider。 当APP_DEBUG为true时,将启用Debugbar

如果使用catch-all/fallback路由,请确保在自己的App ServiceProviders之前加载Debugbar ServiceProvider。

如果不使用auto-discovery,请将ServiceProvider添加到config/app.php中的providers数组:

BarryvdhDebugbarServiceProvider::class,

如果你想添加 facades,就在 aliases 中数组加入:

'Debugbar' => BarryvdhDebugbarFacade::class,

三、(可选)使用publish命令将软件包配置复制到本地配置

php artisan vendor:publish --provider="BarryvdhDebugbarServiceProvider"

四、高级用法

相关资料:

  https://packagist.org/packages/barryvdh/laravel-debugbar

  http://phpdebugbar.com/docs/readme.html

  https://laravel-china.org/articles/4185/laravel-debugbar-do-not-go-to-the-treasure-debugger?order_by=created_at&

原文地址:https://www.cnblogs.com/jxl1996/p/10250946.html