ghostcompiler/laravel-uploads

Laravel Uploads for simple, secure file storage
2,372 18
Install
composer require ghostcompiler/laravel-uploads
Latest Version:v1.2.0
PHP:^8.1
Laravel:10 – 13
License:MIT
Last Updated:Jul 6, 2026
Links: GitHub  ·  Packagist
Maintainer: ghostcompiler

Laravel Uploads Logo

Laravel PHP Laravel Storage

Laravel Uploads manages local/cloud file storage, tracks upload metadata, generates secure tokenized preview URLs, integrates with Eloquent models, and supports real-time image optimization. It also features on-demand proxy streaming for remote URLs with zero local disk footprint.


Installation

Install the package via Composer:

composer require ghostcompiler/laravel-uploads
php artisan install:laravel-uploads
php artisan migrate

Use --force to overwrite any existing assets:

php artisan install:laravel-uploads --force

Basic Usage

Uploading a File

use GhostCompiler\LaravelUploads\Facades\Uploads;

// Store a file under configured defaults
$upload = Uploads::upload($request->file('avatar'));

// Store to a specific directory inside the storage path
$upload = Uploads::upload('avatars', $request->file('avatar'));

Uploading from a URL (Dynamic Proxy Streaming)

You can pass a remote URL string directly. The package will register the reference in the database, proxying it on-demand to hide the source URL and bypass local disk storage:

$upload = Uploads::upload('https://avatar.example.com/user123.jpg');

Resolving Secure URLs

Retrieve secure tokenized URLs to stream or preview private files:

// Generates a secure routing URL expiring in 15 minutes
$url = Uploads::url($upload, 15);

Full Documentation

For detailed guides on configuration settings, Eloquent trait integrations, custom URL resolvers, image optimization pipelines, and Artisan commands, see the:

👉 Laravel Uploads Documentation

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
v1.2.0 ^8.1 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
v1.1.9 ^8.1 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT
v1.1.8 ^8.1 ^10.0 || ^11.0 || ^12.0 || ^13.0 MIT