dearmadman/laravel-image-tool 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

dearmadman/laravel-image-tool

Composer 安装命令:

composer require dearmadman/laravel-image-tool

包简介

ImageTool for Laravel 5

README 文档

README

Simple ImageTool for laravel 5

Installation

The ImageTool Service Provider can be installed via Composer by requiring the dearmadman/laravel-image-tool package and setting the minimum-stability to dev (required for Laravel 5) in your project's composer.json.

{
    "require": {
        "laravel/framework": "5.0.*",
        "dearmadman/laravel-image-tool": "dev-master"
    },
    "minimum-stability": "dev"
}

Usage

To use the ImageTool Service Provider, you must register the provider when bootstrapping your Laravel application. There are essentially two ways to do this.

Find the providers key in app/config/app.php and register the ImageTool Service Provider.

    'providers' => array(
        // ...
        'Dearmadman\ImageTool\ImageToolServiceProvider',
    )

Example Usage

    // [your site path]/app/routes.php

   Route::Post('image-tool',function(){
     $target=false;
     if (config('image.compress_config_enable')) {
         /* compress image */
        $image_tool = ImageTool::GetInstance();
        $arr=[
            'jpeg_quality'=>config('image.compress_rate'),
            'cover_img'=>config('image.compress_cover'),
        ];
        $image_tool->SetConfig($arr);
        $target = $image_tool->GetImageFromString($target,'img');
      }

     return $target ? $target : "false" ;

	});

^_^

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-26