Skip to content

Commit

Permalink
Merge pull request #531 from rmariuzzo/patch-1
Browse files Browse the repository at this point in the history
Syntax highlighting added ✨
  • Loading branch information
barryvdh authored Jul 29, 2016
2 parents 4e0e81e + d5b7bcb commit ecd1ce5
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ It also provides a Facade interface for easy logging Messages, Exceptions and Ti

Require this package with composer:

```
```shell
composer require barryvdh/laravel-debugbar
```

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

```
```php
Barryvdh\Debugbar\ServiceProvider::class,
```

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

```
```php
'Debugbar' => Barryvdh\Debugbar\Facade::class,
```


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`
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.
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)

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

```
```shell
php artisan vendor:publish --provider="Barryvdh\Debugbar\ServiceProvider"
```

### Lumen:

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

```
```php
if (env('APP_DEBUG')) {
$app->register(Barryvdh\Debugbar\LumenServiceProvider::class);
}
```

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

```
```php
$app->configure('debugbar');
```

Expand Down Expand Up @@ -180,14 +179,14 @@ Add the following extensions to your TwigBridge config/extensions.php (or regist
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,
instead of showing it directly in the template. It dumps the arguments, or when empty; all context variables.

```
```twig
{{ debug() }}
{{ debug(user, categories) }}
```

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.

```
```twig
{% stopwatch "foo" %}
…some things that gets timed
{% endstopwatch %}
Expand Down

0 comments on commit ecd1ce5

Please sign in to comment.