承接 anahkiasen/illuminage 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

anahkiasen/illuminage

Composer 安装命令:

composer require anahkiasen/illuminage

包简介

Wrapper for the Imagine library to hook into the Laravel framework

README 文档

README

Illuminage

Build Status Latest Stable Version Total Downloads Scrutinizer Code Quality Code Coverage

Setup

First do composer require anahkiasen/illuminage:dev-master.

Then if you're on a Laravel app, add the following to the providers array in app/config/app.php :

'Illuminage\IlluminageServiceProvider',

And this in the facades array in the same file :

'Illuminage' => 'Illuminage\Facades\Illuminage',

And then do artisan asset:publish anahkiasen/illuminage.

Usage

Illuminage is a wrapper for the Imagine library to hook into the Laravel framework. It implements elegant shortcuts around Imagine and a smart cache system.

// This will create a cropped 200x300 thumb, cache it, and display it in an image tag
echo Illuminage::thumb('image.jpg', 200, 300)
// or
echo Illuminage::image('image.jpg')->thumbnail(200, 300)

// Shortcuts
echo Illuminage::square('image.jpg', 300)

What you get from those calls are not direct HTML strings but objects implementing the HtmlObject\Tag abstract, so you can use all sorts of HTML manipulation methods on them :

$thumb = Illuminage::square('image.jpg', 200)->addClass('image-wide');
$thumb = $thumb->wrapWith('figure')->id('avatar');

echo $thumb;
// <figure id="avatar"><img class="image-wide" src="pathToThumbnail.jpg"></figure>

You can at all time access the original Imagine instance used to render the images :

$thumb = Illuminage::image('foo.jpg')->thumbnail(200, 200);

echo $thumb->grayscale()->onImage(function($image) {
  $image->flipVertically()->rotate(45);
});

统计信息

  • 总下载量: 4.25k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固