besanek/laravel-alias-storage

61,813 2
Install
composer require besanek/laravel-alias-storage
Latest Version:v4.3.0
PHP:^8.1
License:BSD-3-Clause
Last Updated:Apr 9, 2026
Links: GitHub  ·  Packagist
Maintainer: besanek

Laravel Alias Storage

Meta filesystem, witch you can acreate aliases for other filesystems.

Requirement

  • PHP >= 8.1
  • Laravel >= 10.x

Installing

$ composer require "besanek/laravel-alias-storage"

Basic Usage

<?php // config/filesystems.php

return [
    'something' => [
        'driver' => 'alias',
        'target' => 'local',
    ],
];

In that case, calling Storage::disk('something') will returns local filesystem.

Real life use case

<?php // config/filesystems.php

return [
    'video' => [
        'driver' => 'alias',
        'target' => env('VIDEO_STORAGE', 'local'),
    ],
    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
    ],
    's3' => [
        'driver' => 's3',
        // config ...
    ]
];

In local development, you can store videos in local filesystem. But in production, you can set environment VIDEO_STORAGE=s3 and your video uploads are stored and served from S3. Awesome!

Related Packages

jungehaie/laravel-filesystem-google-cloud-storage

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

1,868 2
jbernavaprah/eloquent-fs

A laravel/lumen FileSystem that use Eloquent as datastore, inspired by GridFS (M...

9 1
krenor/skippy

A library for sending AMQP messages to queues or exchanges with Laravel/Lumen

0 0
betapeak/laravel-auditing-filesystem

A filesystem driver for the owen-it/laravel-auditing package. Allows storage of...

6,526 16