Skip to content

Commit

Permalink
Merge pull request #15 from Robertbaelde/add-enabling-debugger
Browse files Browse the repository at this point in the history
Enable/disable api debugger only
  • Loading branch information
mlanin authored Feb 9, 2019
2 parents 7c27f5d + e02d825 commit d6f9a0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/api-debugger.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

return [
'enabled' => (bool) env('API_DEBUGGER_ENABLED', env('APP_DEBUG', false)),
/**
* Specify what data to collect.
*/
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<php>
<env name="API_DEBUGGER_ENABLED" value="true"/>
</php>
</phpunit>
2 changes: 1 addition & 1 deletion src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function boot()

// Register collections only for debug environment.
$config = $this->app['config'];
if ($config['app.debug']) {
if ($config['api-debugger.enabled']) {
$this->registerCollections($config['api-debugger.collections']);
}
}
Expand Down

0 comments on commit d6f9a0a

Please sign in to comment.