定制 ireisaac/laraimage 二次开发

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

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

ireisaac/laraimage

Composer 安装命令:

composer require ireisaac/laraimage

包简介

Easily utilize the glide image package in laravel

README 文档

README

I am a fan of the php leagues Glide Image package and use it in most of my projects. This package will hopefully save someone else some time. Let me know if you handle integrating Glide into laravel differently.

Install

Via Composer

composer require ireisaac/laraimage
php artisan vendor:publish

Register service provider in config/app.php, at the end of the long providers array I'd check around line 155-160

    'providers' => [
        ...
        IreIsaac\LaraImage\ImageServiceProvider::class,
    ]

If you want to have access to an ever so handy facade register it in config/app.php

    'Image' => \IreIsaac\LaraImage\ImageFacade::class,

If you would like to use an artisan command to clear cached images generated by the application use the included command. in the file app/Console/Kernel.php add

    protected $commands = [
        ...
        IreIsaac\LaraImage\Commands\ClearImageCache::class,
    ];

To render a default image when a requested image does not exists, place an image named "ImageNotFound" in storage/app/images/default/, now you can add the following snippet to App\Exceptions\Handler@render and voila.

    if($e instanceof \League\Glide\Filesystem\FileNotFoundException) {

        return Image::outputImage(config('images.placeholder'), $request->all());
    }

Usage

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固