Skip to content

Commit 6f6dbca

Browse files
committed
Add enabled config
1 parent 706b809 commit 6f6dbca

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

config/data-extractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Illuminate\Foundation\Auth\User;
66

77
return [
8-
'allow_production' => env('DATA_EXTRACTOR_PRODUCTION', false),
8+
'is_enabled' => env('DATA_EXTRACTOR_ENABLED', false),
99

1010
'instructions' => [
1111
[

src/Extract.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class Extract
1717

1818
public function __construct()
1919
{
20+
if(!config('data-extractor.is_enabled')) {
21+
throw new Exception('Data Extractor is not enabled. Please check your configuration.');
22+
}
23+
2024
$this->builder = new ExtractBuilder;
2125
}
2226

0 commit comments

Comments
 (0)