2017 © Pedro Peláez
 

library attach

Laravel 4 Attachment

image

teepluss/attach

Laravel 4 Attachment

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

File upload with resized.

Attach is a file uploader for Laravel version 4., (*1)

Installation

To get the lastest version of Theme simply require it in your composer.json file., (*2)

"teepluss/attach": "dev-master"

You'll then need to run composer install to download it and have the autoloader updated., (*3)

Once Attach is installed you need to register the service provider with the application. Open up app/config/app.php and find the providers key., (*4)

'providers' => array(

    'Teepluss\Attach\AttachServiceProvider'

)

Attach also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your app/config/app.php file., (*5)

'aliases' => array(

    'Attach' => 'Teepluss\Attach\Facades\Attach'

)

Publish config using artisan CLI., (*6)

php artisan config:publish teepluss/attach

Usage

Basic upload, (*7)

$attach = Attach::inject(array(
    'subpath' => 'tee'
))
->add(Input::file('userfile'))
->upload();

var_dump($attach->onComplete());

Remote upload, (*8)

$attach = Attach::inject(array(
    'remote' => true
))
->add('http://...../file.png')
->upload();

Resizing, (*9)

$attach = Attach::open('/path/to/image.png')->resize();

// To specific scales from config.

$attach = Attach::open('/path/to/image.png')->resize(array('l', 'm'));

Upload and Resize, (*10)

$attach = Attach::add(Input::file('userfile'))->upload()->resize();

Remove, (*11)

$attach = Attach::open($path)->remove();

You can inject your config anytime, (*12)

$attach = Attach::inject(array(
    ..... YOUR CONFIG .....
))
->upload();

Callback, (*13)

Attach::inject(array(

    'onUpload' => function($result)
    {
        //
    },

    'onComplete' => function($results)
    {
        //
    },

    'onRemove' => function($result)
    {
        //
    }

))
->upload()
->resize();

Support or Contact

If you have some problem, Contact teepluss@gmail.com, (*14)

Support via PayPal, (*15)

The Versions

08/07 2016

v0.2

0.2.0.0 https://github.com/teepluss/laravel4-attach.git

Laravel 4 Attachment

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel upload laravel4 attach

15/08 2014

dev-master

9999999-dev https://github.com/teepluss/laravel4-attach.git

Laravel 4 Attachment

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel upload laravel4 attach

15/08 2014

v1.0

1.0.0.0 https://github.com/teepluss/laravel4-attach.git

Laravel 4 Attachment

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel upload laravel4 attach

01/11 2013

v0.1

0.1.0.0 https://github.com/teepluss/laravel4-attach.git

Laravel 4 Attachment

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel upload laravel4 attach