I have installed
composer require nao-pon/flysystem-google-drive:~1.1
on my project's root. I have also added this on my filesystems.php
'google' => [
'driver' => 'google',
'clientId' => env('GOOGLE_DRIVE_CLIENT_ID'),
'clientSecret' => env('GOOGLE_DRIVE_CLIENT_SECRET'),
'refreshToken' => env('GOOGLE_DRIVE_REFRESH_TOKEN'),
'folderId' => env('GOOGLE_DRIVE_FOLDER_ID'),
]
Moreover, in my .env
GOOGLE_DRIVE_CLIENT_ID=xxx.apps.googleusercontent.com
GOOGLE_DRIVE_CLIENT_SECRET=xxx
GOOGLE_DRIVE_REFRESH_TOKEN=xxx
GOOGLE_DRIVE_FOLDER_ID=null
And finally, in my app.php
App\Providers\GoogleDriveServiceProvider::class,
And even though I have all set up, it still gives me this error when I try to use this route
Route::get('/test1', function() {
Storage::disk('google')->put('test.txt', 'Hello World');
});
I get the error "Driver [google] is not supported."
Edited:
I have this on my GoogleDriveServiceProvider
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
//
}
}