mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
* Create PHP CS Fixer config and add to CI workflow * Run php cs fixer on project * Add newline at end of file * Update to use PHP CS Fixer v3 * Run v3 config on project * Run seperate config in CI
39 lines
756 B
PHP
39 lines
756 B
PHP
<?php
|
|
|
|
namespace Crater\Providers;
|
|
|
|
use Illuminate\Support\Facades\Storage;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use League\Flysystem\Filesystem;
|
|
use Spatie\Dropbox\Client as DropboxClient;
|
|
use Spatie\FlysystemDropbox\DropboxAdapter;
|
|
|
|
class DropboxServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
Storage::extend('dropbox', function ($app, $config) {
|
|
$client = new DropboxClient(
|
|
$config['token']
|
|
);
|
|
|
|
return new Filesystem(new DropboxAdapter($client));
|
|
});
|
|
}
|
|
}
|