Laravel-debugbar: Call to undefined method DebugBar\DebugBar::error()

Created on 18 Aug 2016  Â·  2Comments  Â·  Source: barryvdh/laravel-debugbar

Lavarel version:5.2.43
When trying to use the debugbar after finish installing by the way you give , I got this error .
i'm sure that I have ran composer update barryvdh/laravel-debugbar and composer dump-autoload.
I was thinking if it can't find the 'Barryvdh\Debugbar' ...or something..
composer.js:
{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=5.5.9", "laravel/framework": "5.2.*", "barryvdh/laravel-debugbar": "^2.2" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~4.0", "symfony/css-selector": "2.8.*|3.0.*", "symfony/dom-crawler": "2.8.*|3.0.*" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "classmap": [ "tests/TestCase.php" ] }, "scripts": { "post-root-package-install": [ "php -r \"copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "php artisan key:generate" ], "post-install-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postInstall", "php artisan optimize" ], "post-update-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan optimize" ] }, "config": { "preferred-install": "dist" } }

Controller:
`
use Debug\DebugBar

function(){
Debugbar::error('Error!');
}
`

stale

Most helpful comment

That only works with the facade, or app('debugbar')->error().

All 2 comments

That only works with the facade, or app('debugbar')->error().

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Thijmen picture Thijmen  Â·  6Comments

innerdev picture innerdev  Â·  5Comments

kjhatis picture kjhatis  Â·  5Comments

ddmo picture ddmo  Â·  3Comments

damienfern picture damienfern  Â·  4Comments