PHPackages                             faiznurullah/google-drive-php - 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. faiznurullah/google-drive-php

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

faiznurullah/google-drive-php
=============================

A PHP library for Google Drive integration with Laravel-like API

11PHP

Since Jun 29Pushed 10mo agoCompare

[ Source](https://github.com/Faiznurullah/google-drive-php)[ Packagist](https://packagist.org/packages/faiznurullah/google-drive-php)[ RSS](/packages/faiznurullah-google-drive-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Google Drive PHP Library
========================

[](#google-drive-php-library)

🚀 A modern, production-ready PHP library for Google Drive integration using **Static Design Pattern**. Simple, clean, and powerful - no object instantiation required!

[![PHP Version](https://camo.githubusercontent.com/6b84e9311750c972da98b6d521269a76c32b8928b672000d4a8c5dd7ac866d09/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e312d626c75652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Google Drive API](https://camo.githubusercontent.com/eed7cc4e0c289548e39cd5430631774e825a1f7ff1f6c6a160ad18e6f3878030/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f6f676c6525323044726976652532304150492d76332d7265642e737667)](https://developers.google.com/drive/api/v3/about-sdk)

✨ Why Choose This Library?
--------------------------

[](#-why-choose-this-library)

- 🎯 **Zero Learning Curve** - Intuitive API inspired by Laravel Storage
- ⚡ **No Object Creation** - Direct static method calls
- 🔄 **Auto-Initialization** - Reads credentials from `.env` automatically
- 🎭 **Facade Pattern** - Alternative clean syntax via `GDrive::method()`
- 🛡️ **Production Ready** - Comprehensive error handling &amp; validation
- 🌐 **Framework Agnostic** - Works with any PHP project
- 📦 **Laravel Compatible** - Easy Laravel/Symfony integration
- 🚀 **Batch Operations** - Handle multiple files efficiently
- 📁 **Full CRUD** - Upload, download, delete, copy, move, rename
- 🔍 **Advanced Search** - Find files with powerful queries
- 🔗 **File Sharing** - Public links &amp; email sharing
- 📊 **File Management** - Folders, permissions, metadata

� Installation
--------------

[](#-installation)

Install via Composer:

```
composer require faiznurullah/google-drive-php
```

### Requirements

[](#requirements)

- PHP 8.1 or higher
- Composer
- Google Drive API credentials
- `vlucas/phpdotenv` (for environment variables)

```
# Install dependencies
composer require faiznurullah/google-drive-php vlucas/phpdotenv
```

⚡ Quick Start
-------------

[](#-quick-start)

### 1. Setup Google Drive API Credentials

[](#1-setup-google-drive-api-credentials)

Create a `.env` file in your project root:

```
# Google Drive API Credentials
GOOGLE_DRIVE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_DRIVE_CLIENT_SECRET=GOCSPX-your-client-secret
GOOGLE_DRIVE_REFRESH_TOKEN=1//04your-refresh-token
GOOGLE_DRIVE_ACCESS_TOKEN=ya29.your-access-token
```

### 2. Load Environment Variables

[](#2-load-environment-variables)

```
