Package Data | |
---|---|
Maintainer Username: | juanem1 |
Maintainer Contact: | juanemilioturk@gmail.com (Juan Emilio Turk) |
Package Create Date: | 2016-02-05 |
Package Last Update: | 2016-02-23 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-22 15:02:05 |
Package Statistics | |
---|---|
Total Downloads: | 40 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This package take advantage of the Laravel Filesytem library.
Begin by installing this package through Composer. Edit your project's composer.json file to require ibox/uploader
"require": {
"ibox/uploader": "~1.0"
}
Next, update Composer from the terminal:
composer update
In config/filesystems.php update default key. This library will upload all files to the default option. If you are uploading locally also update the root key to define were the files will be stored.
Example:
In your HTML:
<form action="/images" enctype="multipart/form-data" method="post">
<input type="file" name="image" multiple="multiple" required />
<input type="submit" value="Upload" />
</form>
In your controller:
<?php
use Ibox\Uploader\Uploader;
class ImagesController extends Controller
{
public function store(Request $request, Uploader $uploader)
{
$path = 'some/path';
$imageNames = $uploader->upload($request->file(), $path);
}
}
NOTE: The secong parameter ($path), will only work for cloud storage, check config section.
Enable queue to faster responses.
This package is open source software licensed under the MIT license