koffinate/laravel-filesystem

Illuminate filesystem compatibility with Minio Support
3,806
Install
composer require koffinate/laravel-filesystem
Latest Version:v2.0.0
PHP:^8.3
License:MIT
Last Updated:Jul 19, 2026
Links: GitHub  ·  Packagist
Maintainer: yusronarif

Filesystem Compatibility with Minio support

Software License Latest Version Packagist Version Build Status StyleCI Total Downloads

GitHub forks GitHub stars

Installation

composer require koffinate/laravel-filesystem

Configuration

add this to your environment

MINIO_ACCESS_KEY_ID="minio-access-key"
MINIO_SECRET_ACCESS_KEY="minio-secret-access-key"
MINIO_DEFAULT_REGION="minio-region"
MINIO_BUCKET="minio-bucket"
MINIO_USE_PATH_STYLE_ENDPOINT=true
MINIO_URL="minio-full-url-with-bucket-include"
MINIO_ENDPOINT="minio-endpoint-without-bucket-included"
MINIO_VISIBILITY="public"

or use default laravel aws-s3 environment,

AWS_ACCESS_KEY_ID="s3-access-key"
AWS_SECRET_ACCESS_KEY="s3-secret-access-key"
AWS_DEFAULT_REGION="s3-region"
AWS_BUCKET="s3-bucket"
AWS_USE_PATH_STYLE_ENDPOINT=false
AWS_URL="s3-full-url-with-bucket-include"
AWS_ENDPOINT="s3-endpoint-without-bucket-included"
AWS_VISIBILITY="public"

actually if you want to use both of minio and s3 together, use AWS_ and MINIO_ on your .env.

Custom configuration

You can still customize the configuration by defining new disks with minio key to config/filesystem.php.
or use this command to generate from default config

php artisan koffinate:minio-config

Usage

use normally laravel filesystem as you go.

make sure your FILESYSTEM_DISK on .env set to minio as default,

...
FILESYSTEM_DISK=minio
...

or MEDIA_DISK if using spatie/laravel-medialibrary's package.

...
MEDIA_DISK=minio
...

Obtain disk usage

you can use it directly using method disk from Storage,

// put content into file
Storage::disk('minio')->put('file.jpg', $contents);

// read file contents
$contents = Storage::disk('minio')->get('file.jpg');

// check file is exists
if (Storage::disk('minio')->exists('file.jpg')) {
    // ...
}

// check file is missing or not exists
if (Storage::disk('minio')->missing('file.jpg')) {
    // ...
}

on file upload,

// store on folder
$request->file('files')->store('path-to-folder', 'minio');

// store on folder with new name
$request->file('files')->storeAs('path-to-folder', 'file.jpg', 'minio');

read more usage on Laravel Filesystem.

Related Packages

naturalweb/nwlaravel-filestorage

FileStorage for the Laravel PHP Framework

58 3
jungehaie/laravel-filesystem-google-cloud-storage

A Laravel Flysystem implementation for the Google Cloud Storage via a S3Client.

1,874 2
sykez/laravel-storage-copy

Laravel Artisan command for copying files between Laravel Filesystem/Storage dis...

6,185 7