PHPackages                             joytekmotion/zoho-workdrive - 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. joytekmotion/zoho-workdrive

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

joytekmotion/zoho-workdrive
===========================

Laravel flysystem adapter for Zoho Workdrive

v1.0.4(1y ago)116MITPHPPHP ^8.1

Since Mar 15Pushed 1y agoCompare

[ Source](https://github.com/joytekmotion/zoho-workdrive)[ Packagist](https://packagist.org/packages/joytekmotion/zoho-workdrive)[ RSS](/packages/joytekmotion-zoho-workdrive/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

Flysystem adapter for Zoho Workdrive (uses virtual path)
========================================================

[](#flysystem-adapter-for-zoho-workdrive-uses-virtual-path)

[![Flysystem API version](https://camo.githubusercontent.com/677d74bd1a8a4e9399fe29ab771bf6d89ecadae7e4fca113e6d0ec1c35f9f16c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466c7973797374656d2532304150492d56322d626c75653f7374796c653d666c61742d737175617265)](https://github.com/thephpleague/flysystem/)[![Latest Version on Packagist](https://camo.githubusercontent.com/17ab4a4016fc0471aede5ed0044d1e6a1e6dcbaefba58b4f8b1a5c4f446499ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f7974656b6d6f74696f6e2f7a6f686f2d776f726b64726976652e7376673f6c6162656c3d5061636b6167697374267374796c653d666c61742d737175617265)](https://packagist.org/packages/joytekmotion/zoho-workdrive)[![License](https://camo.githubusercontent.com/40562e5a29cf26553b6f7857708af40d3496198b43c37f3c3838f385e3130074/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f7974656b6d6f74696f6e2f7a6f686f2d776f726b64726976653f6c6162656c3d4c6963656e7365)](https://github.com/joytekmotion/zoho-workdrive/blob/1.x/LICENSE)

This package contains Laravel Flysystem adapter for Zoho Workdrive. It uses the virtual path to interact with the Zoho Workdrive API.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 8.x or higher

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

[](#installation)

You can install this package via composer:

```
composer require joytekmotion/zoho-workdrive
```

Setup
-----

[](#setup)

- Add the following zoho credentials to your `.env` file:

```
ZOHO_CLIENT_ID=
ZOHO_CLIENT_SECRET=
ZOHO_REFRESH_TOKEN=
ZOHO_SCOPE=WorkDrive.files.ALL,ZohoFiles.files.READ,WorkDrive.files.sharing.CREATE
```

To get the `ZOHO_CLIENT_ID` and `ZOHO_CLIENT_SECRET`, you need to create a Zoho Self Client in the [Zoho Developer Console](https://accounts.zoho.com/developerconsole).

- To generate refresh token, you can use the following command:

```
php artisan zoho-oauth:refresh-token {code}
```

Replace `{code}` with the authorization code you generated from [Zoho Developer Console](https://accounts.zoho.com/developerconsole), and copy the refresh token to your `.env` file.

- Add the following disk configuration to your `config/filesystems.php` file:

```
'workdrive' => [
    'driver' => 'workdrive',
    'client_id' => env('ZOHO_CLIENT_ID'),
    'client_secret' => env('ZOHO_CLIENT_SECRET'),
    'refresh_token' => env('ZOHO_REFRESH_TOKEN')
]
```

- Optional: The service provider will be automatically registered by Laravel. If you need to manually register the service provider, add the following to your `config/app.php` file:

```
'providers' => [
    ...
    Joytekmotion\Zoho\Oauth\Providers\ZohoOauthServiceProvider::class,
    ...
]
```

- Add the driver by extending the `Storage` facade in your `AppServiceProvider` or any other service provider:

```
namespace App\Providers;

use Illuminate\Support\Facades\Storage;
use Joytekmotion\Zoho\Workdrive\WorkdriveAdapter;
use Joytekmotion\Zoho\Oauth\SelfClient;
use Illuminate\Filesystem\FilesystemAdapter;
use League\Flysystem\Filesystem;

publc function boot()
{
    Storage::extend('workdrive', function ($app, $config) {
        $adapter =  new WorkDriveAdapter(
            new SelfClient(
                config('zoho.oauth_base_url'),
                $config['client_id'],
                $config['client_secret'],
                $config['refresh_token']
            )
        );
        return new FilesystemAdapter(
            new Filesystem($adapter, $config), $adapter, $config
        );
    });
}
```

- Optional: You can publish the configuration file using the following command:

```
php artisan vendor:publish --provider="Joytekmotion\Zoho\Oauth\Providers\ZohoOauthServiceProvider"
```

Usage
-----

[](#usage)

### To write a file to the disk:

[](#to-write-a-file-to-the-disk)

```
use Illuminate\Support\Facades\Storage;

Storage::disk('workdrive')->put('virtual-folder-id/file.txt', 'contents');
```

### To read a file from the disk:

[](#to-read-a-file-from-the-disk)

```
use Illuminate\Support\Facades\Storage;

$contents = Storage::disk('workdrive')->get('virtual-folder-id/file.txt');
```

### To check if a file exists:

[](#to-check-if-a-file-exists)

```
use Illuminate\Support\Facades\Storage;

$exists = Storage::disk('workdrive')->exists('virtual-folder-id/file.txt');
```

Acknowledgements
----------------

[](#acknowledgements)

This package is inspired by [flysystem-google-drive-ext](https://github.com/masbug/flysystem-google-drive-ext) created by [masbug](https://ko-fi.com/masbug).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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 ~47 days

Recently: every ~59 days

Total

6

Last Release

551d ago

PHP version history (2 changes)v1.0.0PHP ^7.2 | ^8.0

v1.0.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ead7143e3ee47ddae2dd629a9fb9b9464be03218218bb20582244fa27abf8be?d=identicon)[obinnaelviso](/maintainers/obinnaelviso)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/joytekmotion-zoho-workdrive/health.svg)

```
[![Health](https://phpackages.com/badges/joytekmotion-zoho-workdrive/health.svg)](https://phpackages.com/packages/joytekmotion-zoho-workdrive)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M789](/packages/league-flysystem-aws-s3-v3)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[league/flysystem-sftp-v3

SFTP filesystem adapter for Flysystem.

6129.6M91](/packages/league-flysystem-sftp-v3)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)

PHPackages © 2026

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