New

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

besanek/laravel-alias-storage

67,681 2
Install
composer require besanek/laravel-alias-storage
Latest Version:v4.3.1
PHP:^8.1
Laravel:10 – 13
Older releases:5 · 6 · 8 · 9
License:BSD-3-Clause or GPL-2.0 or GPL-3.0
Last Updated:Nov 2, 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

illusionist/flysystem-aliyun-oss

Flysystem adapter for the Aliyun OSS SDK

1,387 1
jungehaie/laravel-filesystem-google-cloud-storage

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

1,890 2
jbernavaprah/eloquent-fs

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

9 1
laradic/filesystem

Filesystem library based on Laravel and Symfony with a lot of extras. Provides a...

419 0
kiendaotac/lumen-installer

Lumen application installer.

12 0

Version History

Version Released PHP Laravel License
v4.3.1 ^8.1 ^10.0|^11.0|^12.0|^13.0 BSD-3-Clause or GPL-2.0 or GPL-3.0
v4.3.0 ^8.1 ^10.0|^11.0|^12.0|^13.0 BSD-3-Clause or GPL-2.0 or GPL-3.0
v4.2.0 ^8.1 ^10.0|^11.0|^12.0 BSD-3-Clause or GPL-2.0 or GPL-3.0
v4.1.0 ^8.1 ^10.0|^11.0 BSD-3-Clause or GPL-2.0 or GPL-3.0
v4.0.0 ^8.1 ^10.0 BSD-3-Clause or GPL-2.0 or GPL-3.0