nao-pon/flysystem-google-drive

getting no results from teamdrive folders

abdulqadir555 opened this issue · 2 comments

this was my code

`
Route::get('list', function() {

$dir = '0AOKPy-Y1ZWZ2Uk9PVA';
$recursive = false; // Get subdirectories also?
$contents = collect(Storage::cloud()->listContents($dir, $recursive));

// return $contents->where('type', '=', 'dir'); // directories
return $contents->where('type', '=', 'file'); // files

});
`

this was result

image

this was my code

` Route::get('list', function() {

$dir = '0AOKPy-Y1ZWZ2Uk9PVA';
$recursive = false; // Get subdirectories also?
$contents = collect(Storage::cloud()->listContents($dir, $recursive));

// return $contents->where('type', '=', 'dir'); // directories
return $contents->where('type', '=', 'file'); // files

}); `

this was result

image

I found a solution
I added team drive id here "GoogleDriveAdapter.php"
image

and it was successfull

image

hope it helps someone

It is no a good idea changing vendor files, you have to put that on a service provider
https://github.com/ivanvermeyen/laravel-google-drive-demo#i-took-care-of-this