如何在Laravel中安装调试栏?

时间:2018-04-14 17:49:10

标签: laravel debugging laravel-5.2 laravel-5.3 xdebug

  

(!)致命错误:无法在C:\ wamp64 \ www中重新声明measure()(之前在C:\ wamp64 \ www \ acellemailll \ vendor \ barryvdh \ laravel-debugbar \ src \ helpers.php:77中声明)第427行的\ acellemailll \ app \ Helpers \ helpers.php

3 个答案:

答案 0 :(得分:2)

打开终端,然后明智地这样做

1)安装DebugBar

  • DebugBar 2.4.x适用于 Laravel 5.4-
  • DebugBar 3.0.x适用于 Laravel 5.5 +

A)安装调试器2.4(Documentation

composer require barryvdh/laravel-debugbar:~2.4

您还需要在providers的{​​{1}}数组中添加:

config/app.php

B)安装调试器3.0(Documentation

Barryvdh\Debugbar\ServiceProvider::class

2)之后,您需要更新作曲家

composer require barryvdh/laravel-debugbar --dev

3)清除缓存和配置

composer update

4)然后,您需要在php artisan cache:clear php artisan config:cache 文件中添加一行

.env

答案 1 :(得分:1)

导航到您的项目文件夹并粘贴以下内容

composer require barryvdh/laravel-debugbar --dev

答案 2 :(得分:0)

作曲家需要barryvdh / laravel-debugbar

打开config / app.php并在“提供商”数组中添加:

“ Barryvdh \ Debugbar \ ServiceProvider”,

https://laravel-news.com/laravel-debugbar