vlsoprun/laravel-imgix

This package is abandoned and no longer maintained. No replacement package was suggested.

Support for laravel imgix client library for generating URLS with imgix.

1.0.10 2017-01-23 00:35 UTC

This package is not auto-updated.

Last update: 2017-09-09 08:56:57 UTC


README

Packagist License StyleCI Latest Stable Version Total Downloads

This repository will no longer be supported 😕

Installation

Require this package with composer:

composer require vlsoprun/laravel-imgix

After updating composer, add the ServiceProvider to the providers array in config/app.php

Laravel 5.x:

Vlsoprun\Imgix\ImgixServiceProvider::class,

If you want to use the facade to log messages, add this to your facades in app.php:

'Imgix' => Vlsoprun\Imgix\Facades\Imgix::class,

Copy the package config to your local config with the publish command:

php artisan vendor:publish --provider="Vlsoprun\Imgix\ImgixServiceProvider"

Helpers

imgix(string $route, $template = 'thumbnail', array $property = []) : string

$route The path to the image

$template Template parameters

$property Additional parameters

Facade

The method creates a URL for image.

Imgix::createURL(string $path, $property = [], $default = true) : string

$route The path to the image

$property Additional parameters

$default If you specify false, the default settings will not be used

The method creates a URL for css.

Imgix::cssURL(string $path, int $colors = 1, string $class = 'image', $property = []) : string

$route The path to the image

$colors The number of colors

$class The class name for the color

$property Additional parameters

Method to retrieve colors from the palette.

Imgix::palette(string $path, int $colors = 1, array $property = [], $toArray = true)

$route The path to the image

$colors The number of colors

$property Additional parameters

$toArray Serialization to array