LaravelPackages.net
Acme Inc.
Toggle sidebar
file-upload-package/laravel-file-upload

A Laravel package for easy file uploads

5
0
v1.0.0
About file-upload-package/laravel-file-upload

file-upload-package/laravel-file-upload is a Laravel package for a laravel package for easy file uploads. It currently has 0 GitHub stars and 5 downloads on Packagist (latest version v1.0.0). Install it with composer require file-upload-package/laravel-file-upload. Discover more Laravel packages by file-upload-package or browse all Laravel packages to compare alternatives.

Last updated

Laravel File Upload Package

Description

Laravel file upload is a package that allows to you upload a single file or multiple files simply.

Installation

composer require file-upload-package/laravel-file-upload

Publish Config File

php artisan vendor:publish --tag=config

1- Using the Package in Your Application

Here are a few short examples of what you can do:

$post = new Post();
//...
$post->image =  FileUpload::uploadSingle($request->file('image'));

$post->save();

You can add folder path.

$post = new Post();
//...
$post->image =  FileUpload::uploadSingle($request->file('iamge'),'posts');

$post->save();

***Dont forget*** run this command.
```bach
php artisan storage:link

2- MediaUploadService class

$post = new Post();
//...
$post->files =  FileUpload::uploadMultiple($request->file('files'));

$post->save();

3- Old File Delete

$fileUpload->oldFileDelete($oldFilePath);
Comments