承接 jancyril/glide-for-laravel 相关项目开发

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

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

jancyril/glide-for-laravel

Composer 安装命令:

composer require jancyril/glide-for-laravel

包简介

A wrapper for League/Glide to easily manipulate images in Laravel 5

README 文档

README

Build Status

A wrapper to easily use Glide in Laravel 5.

Installation

Download via composer:

composer require jancyril/glide-for-laravel

Add the GlideServiceProvider to your config/app.php inside the providers array:

'providers' => [
    JanCyril\Glide\GlideServiceProvider::class,
];

Publish the config file for this package:

php artisan vendor:publish --provider="JanCyril\Glide\GlideServiceProvider"

Modify the values of your config/glide.php file to suit your needs.

Usage

Inject JanCyril\Glide\Glide in the class that will use it.

Resizing an image:

$this->glide->image($imagePath)
            ->resize(200,200)
            ->save($outputFile);

Adding a watermark to the image:

$this->glide->image($imagePath)
            ->addWatermark($watermarkImage)
            ->save($outputFile);

Manipulate image using available parameters from glide:

$parameters = [
    'w' => 200,
    'h' => 200,
    'fit' => fill,
];

$this->glide->image($imagePath)
            ->manipulate($parameters)
            ->save($outputFile);

To see all available parameters visit Glide Page.

Dynamic image manipulation via route:

http://localhost/image/sample_image.jpg?w=200

You can pass parameters as query string to your URL.

The image segment in the URL can be changed in your config/glide.php.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固