Download the PHP package sunveloper/teepluss-up2 without Composer

On this page you can find all versions of the php package sunveloper/teepluss-up2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package teepluss-up2

Uploader Manager for Laravel

For Laravel 4, please use the v1.x branch!

UP2 is a file uploader with polymorphic relations.

Installation

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

"teepluss/up2": "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' => [

    Teepluss\Up2\Up2ServiceProvider::class

]

UP2 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' => [

    'UP2' => Teepluss\Up2\Facades\Up2::class

]

Publish using artisan CLI.

php artisan vendor:publish --provider="Teepluss\Up2\Up2ServiceProvider"

Migrate tables.

php artisan migrate

Usage

The uploader configuration is located at app/config/up2.php. In this file you may specify which uploader driver you would like used by default throughout your application. UP2 supports Local and S3.

'drivers' => array(

    'local' => array(
        'baseUrl' => url(''),
        'baseDir' => path_public(),
    ),

    's3' => array(
        'key'    => '',
        'secret' => '',
        'region' => 'ap-southeast-1',
        'bucket' => 'teeplus',
    ),

),

Then you have to create a morph method for your model that want to use "UP2".

use Teepluss\Up2\Up2Trait;
use Illuminate\Database\Eloquent\Model;

class Blog extends Model {

    use Up2Trait;

    public function .....

}

Now you able to use "UP2" for uploading file.

Upload file and resizing.

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

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

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

// UP2 can upload remote file.
UP2::inject(array('remote' => true))->upload(User::find(1), 'http://domain.com/image.png', array('some_id' => 999))->getResults();

Upload without model.

UP2::upload(null, Input::file('userfile'))->getMasterResult();

Inject configuration.

UP2::inject(array('subpath' => 'uploads/products'))->upload(Blog::find(1), Input::file('userfile'))->getMasterResult();

Look up a file path.

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

foreach ($blogs as $blog)
{
    foreach ($blog->attachments as $attachment)
    {
        echo UP2::lookup($attachment->id);

        // or lookup with scale from config.
        echo UP2::lookup($attachment->id)->scale('l');
    }
}

Remove file(s) from storage.

$attachmentId = 'b5540d7e6350589004e02e23feb3dc1f';

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

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

Support or Contact

If you have some problem, Please contact [email protected]

Support via PayPal


All versions of teepluss-up2 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
intervention/image Version >=2.3
league/flysystem-aws-s3-v3 Version 1.0.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sunveloper/teepluss-up2 contains the following files

Loading the files please wait ....