Download the PHP package artesaos/attacher without Composer

On this page you can find all versions of the php package artesaos/attacher. 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 attacher

Attacher - Pictures attachment tool for Laravel

Upload for S3, Copy, Local, Anything, Manipulate and Attach Images in your Models

Current Build Status

Code Climate Codacy Badge PullReview stats

Statistics

Latest Stable Version Total Downloads Latest Unstable Version License

Inssues Inssues Stars

Tips

Powered by ZenHub

Installation

1 - Dependency

The first step is using composer to install the package and automatically update your composer.json file, you can do this by running:

or manually update your composer.json file

2 - Provider

You need to update your application configuration in order to register the package so it can be loaded by Laravel, just update your config/app.php file adding the following code at the end of your 'providers' section:

3 - Facade

Optional. You do not need to register the Facade of Attacher, but if you want to have access to some shortcuts feel free to use it.

In order to use the Attacher facade, you need to register it on the config/app.php file, you can do that the following way:

3.1 - Facade API

4 - Configuration

Run in your console php artisan vendor:publish, now you have 3 new files, config/attacher.php, config/flysystem.php and database/migrations/2015_03_28_000000_create_attacher_images_table.php

Attacher need graham-campbell/flysystem Don't worry, Attacher registers the flysystem service automatically for you.

In the config/app.php file, you can configure the destination path and the styles guides to manipulate the images.

Usage

The usage is very simple. The image destination information are in flysystem configuration file config/flysystem.php there you define which provider to use for uploading.

1 - Basic

1.1 - Using Styles Guide

Using a specific guide style to manipulate the images:

It is possible to change the style setted in config/attacher.php, by passing an array keyed by the style guide and the style that you wish to change. The array values should be Closure instances which receive the \Intervention\Image\Image:

Or use dot notation to change style:

2 - Traits

Attacher provides you two traits to facilitate the creation of galleries/collections of images linked to other objects using the technique morphMany and morphOne

2.1 - HasImages

Bond with many images

The method addImage() has the same attributes of the method setupFile() of the AttachModel:

2.2 - HasImage [WIP]

Link to an image

The method addImage() has the same attributes of the method setupFile() of the AttachModel:

3 - Setting a Image Model Type

Sometimes you may need to specify a type of image model. For example, when a product there are images for listing and images for gallery. To do so, just pass additional third argument to the method:

Author

Vinicius Reis


All versions of attacher with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5
intervention/image Version ~2.3
graham-campbell/flysystem Version ^3.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 artesaos/attacher contains the following files

Loading the files please wait ....