Skip to content

Commit 3a6fda8

Browse files
authored
Update readme to support Laravel 11.md (#1621)
updated facade aliasing code as per Laravel 11 apps
1 parent 59a8336 commit 3a6fda8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

readme.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,14 @@ If you don't use auto-discovery, add the ServiceProvider to the providers list.
6363
Barryvdh\Debugbar\ServiceProvider::class,
6464
```
6565

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

6868
```php
69-
'Debugbar' => Barryvdh\Debugbar\Facades\Debugbar::class,
69+
public function register(): void
70+
{
71+
$loader = \Illuminate\Foundation\AliasLoader::getInstance();
72+
$loader->alias('Debugbar', \Barryvdh\Debugbar\Facades\Debugbar::class);
73+
}
7074
```
7175

7276
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`

0 commit comments

Comments
 (0)