File "DropboxServiceProvider.php"
Full Path: /home/pulsehostuk9/public_html/invoicer.pulsehost.co.uk/app/Providers/DropboxServiceProvider.php
File size: 711 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\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.
*/
public function register(): void
{
//
}
/**
* Bootstrap services.
*/
public function boot(): void
{
Storage::extend('dropbox', function ($app, $config) {
$client = new DropboxClient(
$config['token']
);
return new Filesystem(new DropboxAdapter($client));
});
}
}