dindigital / din-image
A package to manage images
v1.0
2017-04-24 16:45 UTC
Requires
- php: >=5.5.9
- illuminate/support: 5.1.*|5.2.*
- intervention/image: ^2.3
Requires (Dev)
- phpunit/phpunit: ^4.8
This package is not auto-updated.
Last update: 2024-11-09 19:17:08 UTC
README
Instalação usando Composer
"require": { "dindigital/din-image": "dev-master" }
Utilizando no Laravel
Editar o arquivo config\app.php
:
Service Providers
Din\DinImage\DinImageServiceProvider::class
Alias
'DinImage' => \Din\DinImage\Facades\DinImage::class
Publicar e editar config config/din-image.php
php artisan vendor:publish
Utilizando
use DinImage;
return $image = DinImage::setWidth(100) ->setHeight(100) ->setCommand('fit') ->setName('Mário') ->setImage('panda.jpg') ->render();
Utilizando Fora do Laravel
//Definindo o padrão $this->dinImage = new DinImage([ 'default_image' => __DIR__ . '/../resources/source/default.png', 'source_folder' => __DIR__ . '/../resources/source/', 'dest_folder' => __DIR__ . '/../resources/dest/', ]); return $this->dinImage->setWidth(30) ->setHeight(20) ->setCommand('fit') ->setName('Nome da Imagem') ->setImage('nome-da-imagem.jpg') ->render();