|
1 | 1 | ## Laravel service provider for PHP Console
|
2 | 2 |
|
3 |
| -[](https://packagist.org/packages/php-console/laravel-service-provider) |
| 3 | +[](https://packagist.org/packages/php-console/laravel-service-provider)  |
4 | 4 |
|
5 | 5 | PHP Console allows you to handle PHP errors & exceptions, dump variables, execute PHP code remotely and many other things using [Google Chrome extension PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef) and [PhpConsole server library](https://github.com/barbushin/php-console).
|
6 | 6 |
|
7 | 7 | This packages integrates [PHP Console server library](https://github.com/barbushin/php-console) with [Laravel framework](http://laravel.com) as configurable service provider.
|
8 | 8 |
|
9 | 9 | ## Installation
|
10 | 10 |
|
11 |
| -Require this package in Laravel project `composer.json` and run `composer update`: |
| 11 | +Require this package in Laravel project `composer.json` and run `composer update` |
12 | 12 |
|
13 | 13 | "php-console/laravel-service-provider": "1.*"
|
14 | 14 |
|
15 |
| -After updating composer, add the ServiceProvider to the providers array in app/config/app.php |
| 15 | +After updating composer, add the service provider line to the begining of `providers` array in `/app/config/app.php` |
16 | 16 |
|
17 |
| - 'PhpConsole\Laravel\ServiceProvider', |
| 17 | + 'providers' => array( |
| 18 | + 'PhpConsole\Laravel\ServiceProvider', |
18 | 19 |
|
19 |
| -You can also publish the service provider config-file and feel free to edit it. |
| 20 | +## Edit config |
20 | 21 |
|
21 |
| - php artisan config:publish php-console/laravel-service-provider |
| 22 | +PHP Console service provider config-file looks like this: |
| 23 | + |
| 24 | + return array( |
| 25 | + 'isEnabled' => true, |
| 26 | + 'handleErrors' => true, |
| 27 | + 'handleExceptions' => true, |
| 28 | + 'sourcesBasePath' => base_path(), |
| 29 | + 'registerHelper' => true, |
| 30 | + 'serverEncoding' => null, |
| 31 | + 'headersLimit' => null, |
| 32 | + 'password' => null, |
| 33 | + 'enableSslOnlyMode' => false, |
| 34 | + 'ipMasks' => array(), |
| 35 | + 'isEvalEnabled' => false, |
| 36 | + 'dumperLevelLimit' => 5, |
| 37 | + 'dumperItemsCountLimit' => 100, |
| 38 | + 'dumperItemSizeLimit' => 5000, |
| 39 | + 'dumperDumpSizeLimit' => 500000, |
| 40 | + 'dumperDetectCallbacks' => true, |
| 41 | + 'detectDumpTraceAndSource' => false, |
| 42 | + 'dataStorage' => new PhpConsole\Storage\File(storage_path('php-console.dat'), true), |
| 43 | + ); |
| 44 | + |
| 45 | +See [PhpConsole\Laravel\ServiceProvider](/src/PhpConsole/Laravel/ServiceProvider.php) for detailed options description. |
| 46 | + |
| 47 | +By default it's located in `/vendor/php-console/laravel-service-provider/src/config/config.php` and it's not recommended to be edited in this path because it will be overwritten on next `composer update`. |
| 48 | + |
| 49 | +If you want to edit config you need to run |
| 50 | + |
| 51 | + php artisan config:publish php-console/laravel-service-provider |
| 52 | + |
| 53 | +So config-file will be moved to `/app/config/packages/php-console/laravel-service-provider/config.php` and can be edited as you want and changes will not be lost after `composer update`. |
0 commit comments