You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I updated my Laravel but I get the error when I try to backup.
production.ERROR: Spatie\Backup\BackupDestination\BackupDestination::__construct(): Argument #1 ($disk) must be of type ?Illuminate\Contracts\Filesystem\Filesystem, League\Flysystem\Filesystem given, called in /var/www/mywebsite-staging/releases/12/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestination.php on line 60 {"exception":"[object] (TypeError(code: 0): Spatie\\Backup\\BackupDestination\\BackupDestination::__construct(): Argument #1 ($disk) must be of type ?Illuminate\\Contracts\\Filesystem\\Filesystem, League\\Flysystem\\Filesystem given, called in /var/www/mywebsite-staging/releases/12/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestination.php on line 60 at /var/www/mywebsite-staging/releases/12/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestination.php:23)
[stacktrace]
#0 /var/www/mywebsite-staging/releases/12/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestination.php(60): Spatie\\Backup\\BackupDestination\\BackupDestination->__construct()
#1 /var/www/mywebsite-staging/releases/12/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestinationFactory.php(12): Spatie\\Backup\\BackupDestination\\BackupDestination::create()
#2 [internal function]: Spatie\\Backup\\BackupDestination\\BackupDestinationFactory::Spatie\\Backup\\BackupDestination\\{closure}()
#3 /var/www/mywebsite-staging/releases/12/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(721): array_map()
#4 /var/www/mywebsite-staging/releases/12/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestinationFactory.php(12): Illuminate\\Support\\Collection->map()
#5 /var/www/mywebsite-staging/releases/12/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJobFactory.php(16): Spatie\\Backup\\BackupDestination\\BackupDestinationFactory::createFromArray()
I'm using a DropboxServiceProvider to extend the Storage for Dropbox
<?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 any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Storage::extend('dropbox', function ($app, $config) {
$client = new DropboxClient(
$config['authorization_token']
);
return new Filesystem(new DropboxAdapter($client), ['case_sensitive' => false]);
});
}
}
Besides that I saw that another person has the issue: #83
Thank you <3
The text was updated successfully, but these errors were encountered:
🎉 I just found a solution, because I looked up an alternative to dropbox. I found about google drive and looked up their code for Laravel. And there I found the solution:
The whole code so dropbox is working again:
<?php
namespace App\Providers;
use Illuminate\Filesystem\FilesystemAdapter;
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
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Storage::extend('dropbox', function ($app, $config) {
$client = new DropboxClient(
$config['authorization_token']
);
$adapter = new DropboxAdapter($client);
$driver = new Filesystem($adapter, ['case_sensitive' => false]);
return new FilesystemAdapter($driver, $adapter);
});
}
}
I updated my Laravel but I get the error when I try to backup.
I'm using a DropboxServiceProvider to extend the Storage for Dropbox
Besides that I saw that another person has the issue:
#83
Thank you <3
The text was updated successfully, but these errors were encountered: