2017 © Pedro Peláez
 

library laravel-uploader

Uploading Class for laravel 5

image

dosarkz/laravel-uploader

Uploading Class for laravel 5

  • Friday, December 22, 2017
  • by dosarkz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 91 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 18 % Grown

The README.md

laravel-uploader

Laravel 5 image and file uploader with resizer http://image.intervention.io/, (*1)

Install

composer require dosarkz/laravel-uploader

Add to config/app.php

Provider

Dosarkz\LaravelUploader\Provider\LaravelUploaderServiceProvider::class

Alias

'Uploader' => Dosarkz\LaravelUploader\Facade\LaravelUploaderFacade::class

Sample image upload

Uploader::image(uploaded_file, destination, resize, imageWidth, imageHeight, thumbWidth, thumbHeight)
  • @uploaded_file - instance of UploadedFile
  • @destination - the path to the image, 'images/articles', string
  • @resize - A parameter that determines to use compression or not. In the case of using need to fill one of the parameters the resolution of the image, true or false, boolean
  • @imageWidth, @imageHeight - the parameters of the image in pixels, 100, numeric
  • @thumbWidth, @thumbHeight - the parameters of the thumbnail in pixels, 100, numeric
  use Uploader;

  $image_uploader  = Uploader::image($request->file('avatar'));
  $image = Image::create([
      'name' => $image_uploader->getFileName(),
      'thumb' => $image_uploader->getThumb(),
      'path' => $image_uploader->getDestination(),
  ]);

Sample file upload

Uploader::file(uploaded_file, destination)
  • @uploaded_file - instance of UploadedFile
  • @destination - the path to the image, 'images/articles', string
use Uploader;

 $image_uploader  = Uploader::file($request->file('file'));

  $file = File::create([
      'name' => $image_uploader->getFileName(),
      'path' => $image_uploader->getDestination(),
      'user_id' => auth()->user()->id
  ]);

The Versions

22/12 2017

dev-master

9999999-dev

Uploading Class for laravel 5

  Sources   Download

The Requires

 

by Yezhan Ashenov

22/12 2017

0.2.4

0.2.4.0

Uploading Class for laravel 5

  Sources   Download

The Requires

 

by Yezhan Ashenov

22/12 2017

0.2.3

0.2.3.0

Uploading Class for laravel 5

  Sources   Download

The Requires

 

by Yezhan Ashenov

31/08 2017

0.2.2

0.2.2.0

Uploading Class for laravel 5

  Sources   Download

The Requires

 

by Yezhan Ashenov

24/06 2017

0.2.1

0.2.1.0

Uploading Class for laravel 5

  Sources   Download

The Requires

 

by Yezhan Ashenov

18/04 2017

0.2

0.2.0.0

Uploading Class for laravel 5

  Sources   Download

The Requires

 

by Yezhan Ashenov

18/04 2017

0.1

0.1.0.0

Uploading Class for laravel 5

  Sources   Download

The Requires

 

by Yezhan Ashenov