Skip to content

Juneict/laravel-fileupload-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);

About

file upload service package for use in laravel projects

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages