调用未定义的方法Barryvdh \ Debugbar \ Facade :: startMeasure()Laravel调试栏

时间:2018-07-23 07:26:12

标签: php laravel debugging

尝试使用Barryvdh \ Debugbar调试代码。安装它,一切都完美。将其添加到app.php

'Debugbar' => Barryvdh\Debugbar\Facade::class

但是,当我尝试执行

\Debugbar::startMeasure();

我收到错误

Call to undefined method Barryvdh\Debugbar\Facade::startMeasure()

怎么了?

1 个答案:

答案 0 :(得分:1)

Laravel 5.4不会自动发现软件包,因此需要在配置中手动注册提供商。

在您的app.php中:

'providers' => [ 
      // Other providers
      Barryvdh\Debugbar\ServiceProvider::class
];