LaravelPackages.net
Acme Inc.
Toggle sidebar
snnick/laravel-file-uploader

Laravel package for file upload

235
2
About snnick/laravel-file-uploader

snnick/laravel-file-uploader is a Laravel package for laravel package for file upload. It currently has 2 GitHub stars and 235 downloads on Packagist. Install it with composer require snnick/laravel-file-uploader. Discover more Laravel packages by snnick or browse all Laravel packages to compare alternatives.

Last updated

Installation

Run the following command to install the latest applicable version of the package:

composer require snnick/laravel-file-uploader

After installation, you can publish the package configuration using the vendor:publish command. This command will publish the file-uploader.php configuration file to your config directory:

php artisan vendor:publish --provider="Snnick\LaravelFileUploader\LaravelUploaderServiceProvider"

You may configure the file path in your .env file:

FILE_UPLOAD_PATH=app/public/files

Upload

You can upload files:

$service = new FileService();
$service->upload(collect(request()->file('files')));

Delete

You can delete an uploaded file:

$service = new FileService();
$service->delete('app/public/files/file.pdf');
Comments