PHPackages                             tbetool/google-drive-manager - 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. tbetool/google-drive-manager

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

tbetool/google-drive-manager
============================

Based on Google PHP SDK. Enables using upload and download to Google Drive.

1.1(8y ago)1106PHPPHP &gt;=5.5

Since Jun 19Pushed 8y ago2 watchersCompare

[ Source](https://github.com/TBETool/google-drive-manager)[ Packagist](https://packagist.org/packages/tbetool/google-drive-manager)[ Docs](http://anujsh.in)[ RSS](/packages/tbetool-google-drive-manager/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Google Drive Manager
====================

[](#google-drive-manager)

Google Drive Manager

### Install

[](#install)

```
composer require tbetool/google-drive-manager

```

### Permission required

[](#permission-required)

```
https://www.googleapis.com/auth/drive

```

### Initialize

[](#initialize)

```
$drive = new GoogleDriveManager('client_id', 'client_secret', 'access_token');

```

### set access token

[](#set-access-token)

```
$drive->setAccessToken('access_token');

```

### List items from folder

[](#list-items-from-folder)

```
$response = $drive->listFolder();

```

##### Response

[](#response)

response will contain

```
[
	(int) 0 => [
		'id' => '1YoSEbFDSOejkZmtPmfOyBIoWODhllPjJ',
		'name' => 'Selling Digital Items Modules to be updated ',
		'kind' => null,
		'type' => 'folder',
		'created_time' => null,
		'file_extension' => null,
		'mime_type' => null,
		'modified_time' => null,
		'original_filename' => null,
		'size' => null
	],
]

```

### Search for item

[](#search-for-item)

```
$drive->search('query');

```

Response:

```
[
	(int) 0 => [
		'id' => '1YoSEbFDSOejkZmtPmfOyBIoWODhllPjJ',
		'name' => 'Selling Digital Items Modules to be updated ',
		'kind' => null,
		'type' => 'folder',
		'created_time' => null,
		'file_extension' => null,
		'mime_type' => null,
		'modified_time' => null,
		'original_filename' => null,
		'size' => null
	],
]

```

### download file

[](#download-file)

*currently in development*

```
$drive->download('item_id', $save_to_path);

```

**save\_to\_path** should be absolute local path where to save file

Response:

```
[
	'id' => '1lJNyeIx5BpyK88Vj31YFG6WVVNY_g9Hj',
	'name' => 'file.zip',
	'kind' => 'drive#file',
	'type' => 'application/zip',
	'created_time' => null,
	'file_extension' => null,
	'mime_type' => 'application/zip',
	'modified_time' => null,
	'original_filename' => null,
	'size' => null,
	'download_path' => '/home/path/to/local/save/to/file.zip'
]

```

### create folder

[](#create-folder)

```
$drive->createFolder('folder name', $parent_folder_id);

```

if **$parent\_folder\_id** is not provided, folder will be created in root folder Response:

```
[
	'id' => '1Q6fozdc2JK32HO2nimSKz1lQ0AVxl413',
	'name' => 'New Folder 123',
	'kind' => 'drive#file',
	'type' => 'folder',
	'created_time' => null,
	'file_extension' => null,
	'mime_type' => 'application/vnd.google-apps.folder',
	'modified_time' => null,
	'original_filename' => null,
	'size' => null
]

```

### upload file to folder

[](#upload-file-to-folder)

```
$drive->upload('file/path/', $folder_id);

```

**file\_path** must be absolute path of local file

if **folder\_id** is not provided, file will be uploaded to root folder

Response:

```
[
	'id' => '1Q6fozdc2JK32HO2nimSKz1lQ0AVxl413',
	'name' => 'New Folder 123',
	'kind' => 'drive#file',
	'type' => 'folder',
	'created_time' => null,
	'file_extension' => null,
	'mime_type' => 'application/vnd.google-apps.folder',
	'modified_time' => null,
	'original_filename' => null,
	'size' => null
]

```

### move file to another folder

[](#move-file-to-another-folder)

```
$drive->move($file_id, $folder_id);

```

both **file\_id** and **folder\_id** are required.

Response:

```
[
	'id' => '1Q6fozdc2JK32HO2nimSKz1lQ0AVxl413',
	'name' => 'New Folder 123',
	'kind' => 'drive#file',
	'type' => 'folder',
	'created_time' => null,
	'file_extension' => null,
	'mime_type' => 'application/vnd.google-apps.folder',
	'modified_time' => null,
	'original_filename' => null,
	'size' => null
]

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2935d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6560085?v=4)[Anuj Sharma](/maintainers/anuj9196)[@anuj9196](https://github.com/anuj9196)

---

Top Contributors

[![anuj9196](https://avatars.githubusercontent.com/u/6560085?v=4)](https://github.com/anuj9196 "anuj9196 (4 commits)")

---

Tags

google-drivethe born engineerAnuj SharmaTBEAnuj TBEgoogle-php-sdkdrive-sdk-phpdrive-php-service

### Embed Badge

![Health badge](/badges/tbetool-google-drive-manager/health.svg)

```
[![Health](https://phpackages.com/badges/tbetool-google-drive-manager/health.svg)](https://phpackages.com/packages/tbetool-google-drive-manager)
```

###  Alternatives

[masbug/flysystem-google-drive-ext

Flysystem adapter for Google Drive with seamless virtual&lt;=&gt;display path translation

2682.2M18](/packages/masbug-flysystem-google-drive-ext)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
