PHPackages                             modernmcguire/flysystem-google-drive - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. modernmcguire/flysystem-google-drive

ActiveLibrary[File &amp; Storage](/categories/file-storage)

modernmcguire/flysystem-google-drive
====================================

Flysystem adapter for Google Drive

1.2.0(3y ago)14.2kMITPHPPHP &gt;=8.0

Since Feb 17Pushed 3y agoCompare

[ Source](https://github.com/modernmcguire/flysystem-google-drive)[ Packagist](https://packagist.org/packages/modernmcguire/flysystem-google-drive)[ RSS](/packages/modernmcguire-flysystem-google-drive/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (22)Used By (0)

Flysystem Adapter for Google Drive
==================================

[](#flysystem-adapter-for-google-drive)

[![Author](https://camo.githubusercontent.com/204e32c8ec40a28cd778a206d8f90cb3bf783a9c40c1872bf5f97ff06df7b90e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d6e616f2d2d706f6e2532306879707765622d626c75652e7376673f7374796c653d666c6174)](http://xoops.hypweb.net/)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Installation
------------

[](#installation)

- For Google Drive API V3

```
composer require modernmcguire/flysystem-google-drive:~1.1
```

- For Google Drive API V2 "**Deprecated**"

```
composer require modernmcguire/flysystem-google-drive:~1.0.0
```

#### Follow [Google Docs](https://developers.google.com/drive/v3/web/enable-sdk) to obtain your `ClientId, ClientSecret & refreshToken` in addition you can also check this [easy-to-follow tutorial](https://gist.github.com/ivanvermeyen/cc7c59c185daad9d4e7cb8c661d7b89b)

[](#follow-google-docs-to-obtain-your-clientid-clientsecret--refreshtoken-in-addition-you-can-also-check-this-easy-to-follow-tutorial)

1. Add a `google` disk to your `config/filesystems.php`.

```
'disks' => [

	/* ... */

	'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'),
		'teamDriveId' => env('GOOGLE_DRIVE_TEAM_DRIVE_ID'),
	],
]
```

2. Create a new Service Provider (`App\Providers\GoogleDriveServiceProvider.php`) to contain all of the setup logic.

```
