定制 picsmize/picsmize-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

picsmize/picsmize-laravel

最新稳定版本:v1.0

Composer 安装命令:

composer require picsmize/picsmize-laravel

包简介

Official Picsmize Facade for Laravel

README 文档

README

Installation

To install the most recent version:

$ composer require picsmize/picsmize-laravel

or add the following entry to your composer.json:

"require": {
    "picsmize/picsmize-laravel": "dev-main"
}

and then run composer update.

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider. If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php:

Picsmize\PicsmizeLaravel\PicsmizeServiceProvider::class,

You may also add the following aliases to your config/app.php:

'Picsmize' => Picsmize\PicsmizeLaravel\Facades\Picsmize::class,

Configuration

Publish the configuration for the package which will create the config file config/picsmize.php:

php artisan vendor:publish --provider="Picsmize\PicsmizeLaravel\PicsmizeServiceProvider"

The last step is to provide your Picsmize API Key by either setting app variable picsmize_apikey in your config/app.php file or by directly editing the config/picsmize.php file.

If you don't have your API Key just yet, you can Sign Up for a free account. And That's it! Start optimizing..!

Quick example

use Picsmize;

Picsmize::fetch('https://www.example.com/image.jpg')

->compress(Picsmize::get("COMPRESS_MEDIUM")

->resize(Picsmize::get("RESIZE_AUTO"), array(
	'width' => 400
))

->filter(Picsmize::get("FILTER_BLUR"), array(
	'mode' => "gaussian",
	'value' => 10
))

->flip(Picsmize::get("FLIP_HORIZONTAL"))

->toJSON(function($response){
	
	dd($response);

});

Debugging Mode

To enable debugging mode, just set APP_DEBUG=true and the package will include the queries and inputs used when processing the table.

IMPORTANT: Please make sure that APP_DEBUG is set to false when your app is on production.

Security

If you discover any security related issues, please email picsmize@gmail.com instead of using the issue tracker.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固