Level 54
not familiar with google drive api client... but the error seem like syntax error for Storage::extends, should be Storage::extend without "s"...
1 like
I am trying to upload file to google drive. but got error, call to undefined method League\Flysystem\Filesystem::extends. My GoogleDriveServiceProvider looks like
use Illuminate\Support\ServiceProvider;
use Google_Client;
use Google_Service_Drive;
use Hypweb\Flysystem\GoogleDrive\GoogleDriveAdapter;
use Illuminate\Support\Facades\Storage;
public function boot()
{
Storage::extends('google', function ($app, $config) {
$client = new Google_Client;
$client->setClientId($config['clientId']);
$client->setClientSecret($config['clientSecret']);
$client->refreshToken($config['refreshToken']);
$service = new Google_Service_Drive($client);
$adapter = new GoogleDriveAdapter($service, $config['folderId']);
$filesystem = new \League\Flysystem\Filesystem($adapter);
return $filesystem;
});
}
I am using google/apiclient and neo pon Flysystem version 1.1. Why did I got that error?
not familiar with google drive api client... but the error seem like syntax error for Storage::extends, should be Storage::extend without "s"...
Please or to participate in this conversation.