承接 hubertnnn/imaginator 相关项目开发

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

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

hubertnnn/imaginator

Composer 安装命令:

composer require hubertnnn/imaginator

包简介

Image processor and provider

README 文档

README

This package is not finished yet

This package adds an easy to use and secure way of providing scaled images.

Current version can only be used with laravel, but there are plans to make it framework agnostic in the future.

Installation

Install using composer:

composer require hubertnnn/imaginator

Then publish laravel config file:

php artisan vendor:publish --provider="HubertNNN\Imaginator\Integration\Laravel\ImaginatorServiceProvider" --tag="config"

For laravel versions below 5.5 you need to register the provider and facade. To do so add the ServiceProvider to the providers array in config/app.php:

HubertNNN\Imaginator\Integration\Laravel\ImaginatorServiceProvider::class,

and Facade to the facades array in the same file

'Imaginator' => HubertNNN\Imaginator\Integration\Laravel\ImaginatorFacade::class,

Configuration

All configuration is done using config/imaginator.php file. Each option is documented inside the file.

Basic configuration requires you to setup providers and formats. The default file contains example configuration.

Usage

You can create an image link using following commands:

Imaginator::entity($entity, $format, $optionalEntityType);
Imaginator::image($type, $instance, $format);

For example:

$user = User::first();
echo Imaginator::entity($user, '800x600');

If single entity provides more than 1 image (eg. user can have an avatar and a picture), you can use the optional parameter to choose what image are you interested in. Here is an example of usage in blade view.

<img src="{{ Imaginator::entity($user, '800x600', 'avatar') }}">

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固