New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

quix-labs/laravel-supabase-flysystem

Supabase Adapter for Laravel Flysystem Storage
12,694 16
Install
composer require quix-labs/laravel-supabase-flysystem
Latest Version:1.0.1
PHP:^8.1
Laravel:10 · 11 · 12
License:MIT
Last Updated:Apr 27, 2026
Links: GitHub  ·  Packagist
Maintainer: alancolant

Laravel Supabase Storage Adapter

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads


Easily integrate Supabase as a storage driver in Laravel with this Flysystem adapter.

Simplify file storage and retrieval using Laravel's convenient storage system while leveraging the powerful features of Supabase.


Requirements

  • PHP >= 8.1
  • Laravel 10.x|11.x
  • Fileinfo ext-fileinfo

Installation

To install the package, use Composer:

composer require quix-labs/laravel-supabase-flysystem
Configuration

After installation, configure the Supabase driver in Laravel's config/filesystems.php.

Add the following to the disks array:

'supabase' => [
    'driver' => 'supabase',
    'key'    => env('SUPABASE_STORAGE_KEY'), // Use a privileged key; read-only does not work
    'bucket' => env('SUPABASE_STORAGE_BUCKET'),
    'endpoint' => env('SUPABASE_STORAGE_ENDPOINT'),

    'url'      => null, // <- Automatically generated; change here if you are using a proxy

    'public'                      => true,  // Default to true
    'defaultUrlGeneration'        => null, // 'signed' | 'public' <- default depends on public

    'defaultUrlGenerationOptions' => [
        'download'  => false,
        'transform' => [],
    ],

    'signedUrlExpires' => 60*60*24, // 1 day <- default to 1 hour (3600)
],

Usage

// Example code for using the Supabase driver with Laravel Storage
Storage::disk('supabase')->put('file.txt', 'contents');

// Custom function to generate a public URL
Storage::disk('supabase')->getAdapter()->getPublicUrl('completelyPublicFile.png', [
    'download'  => false, // Set this to true if you want the user's browser to automatically trigger download
    
    // Transform only applied if the file is detected as an image; else ignored
    'transform' => [ 
        'width' => 200,
        //... All options -> https://supabase.com/docs/guides/storage/serving/image-transformations#transformation-options
    ]]);

// Custom function to generate a signed URL
Storage::disk('supabase')->getAdapter()->getSignedUrl('veryConfidentialFile.png', [
    'expiresIn' => 60 * 5, // 5 minutes
    //... Same options as getPublicUrl
]);

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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

Related Packages

iclimber/laravel-supabase-flysystem

Supabase Adapter for Laravel Flysystem Storage

1,397 0
danhunsaker/laravel-flysystem-service

Automatically registers every Flysystem adapter it recognizes as a Laravel Files...

35,183 3
danhunsaker/laravel-flysystem-others

Automatically registers every third-party Flysystem adapter it recognizes as a L...

33,913 22
arquivei/flysystem-php

Arquivei Flysystem Adapters.

9,483 4
nvahalik/laravel-filer

An advanced wrapper over Flysystem for Laravel.

4,157 17

Version History

Version Released PHP Laravel License
1.0.1 ^8.1 ^10.0 || ^11.0 || ^12.0 MIT
1.0.0 ^8.1 ^10.0|^11.0 MIT