Conditions | 4 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function boot() |
||
14 | { |
||
15 | Storage::extend('b2', function ($app, $config) { |
||
16 | if(!( |
||
17 | isset($config['accountId']) || |
||
18 | isset($config['applicationKey']) || |
||
19 | isset($config['bucketName']))) { |
||
20 | throw new BackblazeException('Please set all configuration keys. (accountId, applicationKey, bucketName)'); |
||
21 | } |
||
22 | $client = new Client($config['accountId'], $config['applicationKey']); |
||
23 | $adapter = new BackblazeAdapter($client, $config['bucketName']); |
||
24 | return new Filesystem($adapter); |
||
25 | }); |
||
26 | } |
||
27 | public function register() |
||
31 |