New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

teepluss/attach

Laravel 4 Attachment
204 14

Larablocks Analysis

teepluss/attach works with any PHP project: the latest release (v1.0, Aug 15, 2014) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: Jul 8, 2016)
  • 0 downloads a month (needs 10,000)
  • 14 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Jul 8, 2016.
  • No releases in the last 12 months.
  • First released: Nov 1, 2013.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 26, 2026.

Install
composer require teepluss/attach
Latest Version:v1.0
PHP:>=5.3.0
License:MIT
Last Updated:Jul 8, 2016
Links: GitHub  ·  Packagist
Maintainer: teepluss

File upload with resized.

Attach is a file uploader for Laravel version 4.

Installation

To get the lastest version of Theme simply require it in your composer.json file.

"teepluss/attach": "dev-master"

You'll then need to run composer install to download it and have the autoloader updated.

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.

'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.

'aliases' => array(

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

)

Publish config using artisan CLI.

php artisan config:publish teepluss/attach

Usage

Basic upload

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

var_dump($attach->onComplete());

Remote upload

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

Resizing

$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

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

Remove

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

You can inject your config anytime

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

Callback

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

Support via PayPal

Related Packages

teepluss/up2

UP2 is a file uploader with polymorphic relations.

730 12
teepluss/up

UP is a file uploader with polymorphic relations.

284 20
teepluss/cloudinary

Cloudinary API wrapper for Laravel 4

10,562 18
agile-fc/cloudder-api

Cloudinary API wrapper for Laravel

2,762 0
ont/laravel-uploader

Implementation of Ont\Interfaces\Uploader which saves files in local filesystem.

1,062

Version History

Version Released PHP License
v1.0 >=5.3.0 MIT
v0.2 >=5.3.0 MIT
v0.1 >=5.3.0 MIT