codepane/laravel-image-handler 问题修复 & 功能扩展

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

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

codepane/laravel-image-handler

最新稳定版本:0.7

Composer 安装命令:

composer require codepane/laravel-image-handler

包简介

Optimize and store images in multiple sizes easily.

README 文档

README

Optimize and store images in multiple sizes easily.

Installation steps

composer require codepane/laravel-image-handler
php artisan vendor:publish --provider="Codepane\LaravelImageHandler\ImageHandlerServiceProvider"

Configuration

  • After installation is done once you can see imagehandler.php under the config directory.
  • You can update dimensions, format, and quality as per your need from a configuration file.
  • You can also add a new dimension.

Usage

Let's deep dive into this package for how to use it

Store Image

use ImageHandler;

public function store()
{
    // its takes the default file name as it is
    ImageHandler::store($request->file);

    // in 2nd argument you can pass your custom file name with or without the path
    ImageHandler::store($request->file, 'file_name_with_or_without_path');
}

Get Image

use ImageHandler;

public function get()
{
    // this will return the original image
    ImageHandler::get('original_file_name');

    // pass dimension as the second argument to get a specific dimension of the file
    ImageHandler::get('original_file_name', 'sm');
}

Get Image Name

use ImageHandler;

public function get()
{
    // pass dimension as the second argument to get a specific dimension of the file name
    ImageHandler::getFileName('original_file_name', 'sm');
}

Delete Image

use ImageHandler;

public function delete()
{
    ImageHandler::delete('original_file_name');
}

Contributing

Contributions are always welcome!

  • Make a pull request if you have to contribute to this lovely library!
  • We will review and pull your request.

统计信息

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

GitHub 信息

  • Stars: 43
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固