Skip to content

Commit

Permalink
Update readme to support Laravel 11.md (#1621)
Browse files Browse the repository at this point in the history
updated facade aliasing code as per Laravel 11 apps
  • Loading branch information
devsrv committed May 8, 2024
1 parent 59a8336 commit 3a6fda8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ If you don't use auto-discovery, add the ServiceProvider to the providers list.
Barryvdh\Debugbar\ServiceProvider::class,
```

If you want to use the facade to log messages, add this to your facades in app.php:
If you want to use the facade to log messages, add this within the `register` method of `app/Providers/AppServiceProvider.php` class:

```php
'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,
public function register(): void
{
$loader = \Illuminate\Foundation\AliasLoader::getInstance();
$loader->alias('Debugbar', \Barryvdh\Debugbar\Facades\Debugbar::class);
}
```

The profiler is enabled by default, if you have APP_DEBUG=true. You can override that in the config (`debugbar.enabled`) or by setting `DEBUGBAR_ENABLED` in your `.env`. See more options in `config/debugbar.php`
Expand Down

0 comments on commit 3a6fda8

Please sign in to comment.