PHPackages                             alies-dev/laravel-supabase-flysystem - 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. alies-dev/laravel-supabase-flysystem

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

alies-dev/laravel-supabase-flysystem
====================================

Laravel Flysystem adapter for Supabase Storage

1.0.1(5mo ago)23.7k↓100%[1 issues](https://github.com/alies-dev/laravel-supabase-flysystem/issues)MITPHPPHP ^8.2CI passing

Since Mar 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/alies-dev/laravel-supabase-flysystem)[ Packagist](https://packagist.org/packages/alies-dev/laravel-supabase-flysystem)[ RSS](/packages/alies-dev-laravel-supabase-flysystem/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (6)Used By (0)

Laravel Supabase Flysystem
==========================

[](#laravel-supabase-flysystem)

[![Total Downloads](https://camo.githubusercontent.com/7ccc9281962cdc54eb1bf5d7d22582dcae84a0b1e7ac61db7d4aeb33260cc70f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c6965732d6465762f6c61726176656c2d73757061626173652d666c7973797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alies-dev/laravel-supabase-flysystem)[![License](https://camo.githubusercontent.com/858d66d4d5d7c902ad07b2cc2d545d0bf8940efa10c954fbda038f8caff8956a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616c6965732d6465762f6c61726176656c2d73757061626173652d666c7973797374656d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alies-dev/laravel-supabase-flysystem)[![Type coverage](https://camo.githubusercontent.com/6eddca6dfcb2fdd33c7f790a52a6738633867480ce491998e8403acfa482fe74/68747470733a2f2f73686570686572642e6465762f6769746875622f616c6965732d6465762f6c61726176656c2d73757061626173652d666c7973797374656d2f636f7665726167652e737667)](https://shepherd.dev/github/alies-dev/laravel-supabase-flysystem)[![Tests](https://github.com/alies-dev/laravel-supabase-flysystem/actions/workflows/phpunit.yml/badge.svg)](https://github.com/alies-dev/laravel-supabase-flysystem/actions/workflows/phpunit.yml)[![codecov](https://camo.githubusercontent.com/54a7745d92c4326c50bb38e2850e0e481dac6f4a6f563435ef0789a45bb02ff9/68747470733a2f2f636f6465636f762e696f2f67682f616c6965732d6465762f6c61726176656c2d73757061626173652d666c7973797374656d2f67726170682f62616467652e7376673f746f6b656e3d504a4739564544333654)](https://codecov.io/gh/alies-dev/laravel-supabase-flysystem)

A [Laravel Flysystem](https://laravel.com/docs/master/filesystem) adapter for [Supabase Storage](https://supabase.com/docs/guides/storage) with proper handling of signed URLs and transform options.

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

[](#installation)

You can install the package via composer:

```
composer require alies-dev/laravel-supabase-flysystem
```

The package will automatically register its service provider if you're using Laravel's package auto-discovery.

Configuration
-------------

[](#configuration)

### Environment Variables

[](#environment-variables)

Add the following variables to your `.env` file:

```
SUPABASE_STORAGE_KEY=your-supabase-key
SUPABASE_STORAGE_BUCKET=your-bucket-name
SUPABASE_STORAGE_ENDPOINT=https://your-project-ref.supabase.co
```

### Full Configuration Options

[](#full-configuration-options)

Add the following config to the disk array in `config/filesystems.php`:

```
'supabase' => [
    'driver' => 'supabase',
    'key' => env('SUPABASE_STORAGE_KEY'),
    'bucket' => env('SUPABASE_STORAGE_BUCKET'),
    'endpoint' => env('SUPABASE_STORAGE_ENDPOINT'),

    // Optional configuration
    'url' => env('SUPABASE_STORAGE_URL'), // Custom URL for public access
    'public' => env('SUPABASE_STORAGE_PUBLIC', false), // Set to true for public buckets

    'signed_url_ttl,' => 60 * 60 * 24, // Default TTL for signed URLs (1 day)
    'url_options' => [], // Default URL generation options supported by Supabase Storage (download, transform)
],
```

Usage
-----

[](#usage)

### Basic Operations

[](#basic-operations)

```
// Store a file
Storage::disk('supabase')->put('path/to/file.jpg', $contents);

// Check if a file exists
if (Storage::disk('supabase')->exists('path/to/file.jpg')) {
    // File exists
}

// Get file contents
$contents = Storage::disk('supabase')->get('path/to/file.jpg');

// Delete a file
Storage::disk('supabase')->delete('path/to/file.jpg');

// Copy a file
Storage::disk('supabase')->copy('original.jpg', 'copy.jpg');

// Move/rename a file
Storage::disk('supabase')->move('old-name.jpg', 'new-name.jpg');
```

### URL Generation

[](#url-generation)

```
// Get a URL (signed or public based on configuration)
$url = Storage::disk('supabase')->url('path/to/file.jpg');

// Get a signed URL with default options
$signedUrl = Storage::disk('supabase')->temporaryUrl(
    'path/to/file.jpg',
    now()->addHour()
);

// Get a signed URL with custom transform options
$transformedUrl = Storage::disk('supabase')->url('path/to/file.jpg', [
    'transform' => [
        'width' => 100,
        'height' => 100,
        'format' => 'webp',
    ]
]);

// Get a signed URL with a download option
$downloadUrl = Storage::disk('supabase')->url('path/to/file.jpg', [
    'download' => true,
]);
```

### Directory Operations

[](#directory-operations)

```
// Create a directory
Storage::disk('supabase')->makeDirectory('path/to/directory');

// Delete a directory and all its contents
Storage::disk('supabase')->deleteDirectory('path/to/directory');

// List contents of a directory
$files = Storage::disk('supabase')->files('path/to/directory');
$directories = Storage::disk('supabase')->directories('path/to/directory');

// List all files recursively
$allFiles = Storage::disk('supabase')->allFiles('path/to/directory');
```

### Metadata Operations

[](#metadata-operations)

```
// Get file size
$size = Storage::disk('supabase')->size('path/to/file.jpg');

// Get file mime type
$mimeType = Storage::disk('supabase')->mimeType('path/to/file.jpg');

// Get file last modified timestamp
$lastModified = Storage::disk('supabase')->lastModified('path/to/file.jpg');
```

Advanced Usage
--------------

[](#advanced-usage)

### Image Transformations

[](#image-transformations)

Supabase Storage supports [image transformations](https://supabase.com/docs/guides/storage/serving/image-transformations) for images. You can specify transformation options when generating URLs:

```
$url = Storage::disk('supabase')->url('path/to/image.jpg', [
    'transform' => [
        'width' => 300,
        'height' => 200,
        'resize' => 'cover', // 'cover', 'contain', or 'fill'
        'format' => 'webp',  // 'webp', 'png', 'jpg', etc.
        'quality' => 80,     // 1-100
    ]
]);
```

### Temporary URLs

[](#temporary-urls)

Generate URLs that expire after a specific time:

```
$url = Storage::disk('supabase')->temporaryUrl(
    'path/to/file.jpg',
    now()->addMinutes(30), // Expires in 30 minutes
    [
        'transform' => [
            'width' => 100,
            'height' => 100,
        ],
        'download' => true, // Force download
    ]
);
```

Testing
-------

[](#testing)

The package includes a comprehensive test suite that covers all major functionality:

```
composer test
```

All tests use Laravel's HTTP client fakes to mock Supabase API responses, ensuring no actual API calls are made during testing.

Changelog
---------

[](#changelog)

Please refer to [GitHub Releases](https://github.com/alies-dev/laravel-supabase-flysystem/releases) for the changelog.

License
-------

[](#license)

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

Credits
-------

[](#credits)

- [Quix Labs](https://github.com/quix-labs) - For providing a great starting point for this package
- [Alies](https://github.com/alies-dev)
- [All Contributors](../../contributors)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance71

Regular maintenance activity

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.5% 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 ~90 days

Total

4

Last Release

159d ago

Major Versions

0.0.2 → 1.0.02025-03-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/c9acedf8ce33bd0f1b27bc0de9ea640544c778c1752263254e9591b2f2661dec?d=identicon)[alies-dev](/maintainers/alies-dev)

---

Top Contributors

[![alies-dev](https://avatars.githubusercontent.com/u/5278175?v=4)](https://github.com/alies-dev "alies-dev (31 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (9 commits)")

---

Tags

laravel-filesystemsupasbase

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alies-dev-laravel-supabase-flysystem/health.svg)

```
[![Health](https://phpackages.com/badges/alies-dev-laravel-supabase-flysystem/health.svg)](https://phpackages.com/packages/alies-dev-laravel-supabase-flysystem)
```

###  Alternatives

[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)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[yoelpc4/laravel-cloudinary

Laravel Cloudinary filesystem cloud driver.

3343.0k](/packages/yoelpc4-laravel-cloudinary)[dgtlss/capsule

A Laravel package for backing up databases and files to external sources with notifications

194.3k](/packages/dgtlss-capsule)[quix-labs/laravel-supabase-flysystem

Supabase Adapter for Laravel Flysystem Storage

169.9k](/packages/quix-labs-laravel-supabase-flysystem)

PHPackages © 2026

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