Skip to content

Commit d6f9a0a

Browse files
authored
Merge pull request #15 from Robertbaelde/add-enabling-debugger
Enable/disable api debugger only
2 parents 7c27f5d + e02d825 commit d6f9a0a

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

config/api-debugger.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
return [
4+
'enabled' => (bool) env('API_DEBUGGER_ENABLED', env('APP_DEBUG', false)),
45
/**
56
* Specify what data to collect.
67
*/

phpunit.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@
1919
<directory suffix=".php">./src/</directory>
2020
</whitelist>
2121
</filter>
22+
<php>
23+
<env name="API_DEBUGGER_ENABLED" value="true"/>
24+
</php>
2225
</phpunit>

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function boot()
2222

2323
// Register collections only for debug environment.
2424
$config = $this->app['config'];
25-
if ($config['app.debug']) {
25+
if ($config['api-debugger.enabled']) {
2626
$this->registerCollections($config['api-debugger.collections']);
2727
}
2828
}

0 commit comments

Comments
 (0)