PHPackages                             teepluss/up - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. teepluss/up

ActiveLibrary[File &amp; Storage](/categories/file-storage)

teepluss/up
===========

UP is a file uploader with polymorphic relations.

v1.0.0(11y ago)202842[1 issues](https://github.com/teepluss/laravel4-up/issues)[1 PRs](https://github.com/teepluss/laravel4-up/pulls)MITPHPPHP &gt;=5.3.0

Since Aug 28Pushed 11y ago1 watchersCompare

[ Source](https://github.com/teepluss/laravel4-up)[ Packagist](https://packagist.org/packages/teepluss/up)[ Docs](https://github.com/teepluss/laravel4-up)[ RSS](/packages/teepluss-up/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

UP is deprecated. Please use the [UP2](https://github.com/teepluss/laravel4-up2)

UP for Laravel 4
----------------

[](#up-for-laravel-4)

UP is a file uploader with polymorphic relations.

### Installation

[](#installation)

- [UP on Packagist](https://packagist.org/packages/teepluss/up)
- [UP on GitHub](https://github.com/teepluss/laravel4-up)

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

```
"teepluss/up": "dev-master"

```

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

Once Theme 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\Up\UpServiceProvider'

)

```

UP 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(

    'UP' => 'Teepluss\Up\Facades\Up'

)

```

Publish config using artisan CLI.

```
php artisan config:publish teepluss/up

```

Migrate tables.

```
php artisan migrate --package=teepluss/up

```

Usage
-----

[](#usage)

First you have to create a morph method for your model that want to use "UP".

```
class Blog extends Eloquent {

    public function .....

    /**
     * Blog has many files upload.
     *
     * @return AttachmentRelate
     */
    public function files()
    {
        return $this->morphMany('\Teepluss\Up\AttachmentRelates\Eloquent\AttachmentRelate', 'fileable');
    }

}
```

### After create a method "files", Blog can use "UP" to upload files.

[](#after-create-a-method-files-blog-can-use-up-to-upload-files)

Upload file and resizing.

```
// Return an original file meta.
UP::upload(Blog::find(1), Input::file('userfile'))->getMasterResult();
UP::upload(User::find(1), Input::file('userfile'))->getMasterResult();

// Return all results files uploaded including resized.
UP::upload(Product::find(1), Input::file('userfile'))->resize()->getResults();

// If you have other fields in table attachments.
UP::upload(User::find(1), Input::file('userfile'), array('some_id' => 999))->getMasterResult();
```

// UP can upload remote file. UP::inject(array('remote' =&gt; true))-&gt;upload(User::find(1), Input::file('userfile'), array('some\_id' =&gt; 999))-&gt;getResults();

Look up a file path.

```
$blogs = Blog::with('files')->get();

foreach ($blogs as $blog)
{
    foreach ($blog->files as $file)
    {
        // Access attachment.
        // var_dump($file->atatchment);

        echo UP::lookup($file->attachment_id);

        // or lookup with scale from config.

        echo UP::lookup($file->attachment_id)->scale('l');
    }
}
```

Remove file(s) from storage.

```
$attachmentId = 'b5540d7e6350589004e02e23feb3dc1f';

// Remove a single file.
UP::remove($attachmentId);

// Remove all files including resized.
UP::remove($attachmentId, true);
```

Support or Contact
------------------

[](#support-or-contact)

If you have some problem, Please contact

[![Support via PayPal](https://camo.githubusercontent.com/1c4c2a63b268ab949717893dda9628735444f61b8eb8eece283a534338b5b0e5/68747470733a2f2f7261776769746875622e636f6d2f63687269732d2d2d2f446f6e6174696f6e2d4261646765732f6d61737465722f70617970616c2e6a706567)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9GEC8J7FAG6JA)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4325d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1464300?v=4)[Maximus](/maintainers/teepluss)[@teepluss](https://github.com/teepluss)

---

Tags

laravelresizeuploadlaravel4

### Embed Badge

![Health badge](/badges/teepluss-up/health.svg)

```
[![Health](https://phpackages.com/badges/teepluss-up/health.svg)](https://phpackages.com/packages/teepluss-up)
```

###  Alternatives

[teepluss/cloudinary

Cloudinary API wrapper for Laravel 4

1910.5k](/packages/teepluss-cloudinary)[itskodinger/midia

Simple Media manager for your Laravel project

1416.0k](/packages/itskodinger-midia)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
