Skip to content

Commit ecd1ce5

Browse files
authored
Merge pull request barryvdh#531 from rmariuzzo/patch-1
Syntax highlighting added ✨
2 parents 4e0e81e + d5b7bcb commit ecd1ce5

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

readme.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ It also provides a Facade interface for easy logging Messages, Exceptions and Ti
4343

4444
Require this package with composer:
4545

46-
```
46+
```shell
4747
composer require barryvdh/laravel-debugbar
4848
```
4949

@@ -52,40 +52,39 @@ After updating composer, add the ServiceProvider to the providers array in confi
5252
5353
### Laravel 5.x:
5454

55-
```
55+
```php
5656
Barryvdh\Debugbar\ServiceProvider::class,
5757
```
5858

5959
If you want to use the facade to log messages, add this to your facades in app.php:
6060

61-
```
61+
```php
6262
'Debugbar' => Barryvdh\Debugbar\Facade::class,
6363
```
6464

65-
6665
The profiler is enabled by default, if you have app.debug=true. You can override that in the config (`debugbar.enabled`). See more options in `config/debugbar.php`
6766
You can also set in your config if you want to include/exclude the vendor files also (FontAwesome, Highlight.js and jQuery). If you already use them in your site, set it to false.
6867
You can also only display the js or css vendors, by setting it to 'js' or 'css'. (Highlight.js requires both css + js, so set to `true` for syntax highlighting)
6968

7069
Copy the package config to your local config with the publish command:
7170

72-
```
71+
```shell
7372
php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
7473
```
7574

7675
### Lumen:
7776

7877
For Lumen, register a different Provider in `bootstrap/app.php`:
7978

80-
```
79+
```php
8180
if (env('APP_DEBUG')) {
8281
$app->register(Barryvdh\Debugbar\LumenServiceProvider::class);
8382
}
8483
```
8584

8685
To change the configuration, copy the file to your config folder and enable it:
8786

88-
```
87+
```php
8988
$app->configure('debugbar');
9089
```
9190

@@ -180,14 +179,14 @@ Add the following extensions to your TwigBridge config/extensions.php (or regist
180179
The Dump extension will replace the [dump function](http://twig.sensiolabs.org/doc/functions/dump.html) to output variables using the DataFormatter. The Debug extension adds a `debug()` function which passes variables to the Message Collector,
181180
instead of showing it directly in the template. It dumps the arguments, or when empty; all context variables.
182181

183-
```
182+
```twig
184183
{{ debug() }}
185184
{{ debug(user, categories) }}
186185
```
187186

188187
The Stopwatch extension adds a [stopwatch tag](http://symfony.com/blog/new-in-symfony-2-4-a-stopwatch-tag-for-twig) similar to the one in Symfony/Silex Twigbridge.
189188

190-
```
189+
```twig
191190
{% stopwatch "foo" %}
192191
…some things that gets timed
193192
{% endstopwatch %}

0 commit comments

Comments
 (0)