ph-7/image-unsplash
最新稳定版本:v3.2
Composer 安装命令:
composer require ph-7/image-unsplash
包简介
Get easily any Unsplash images with a clean PHP class
README 文档
README
Get Unsplash Images Easily
Get easily any Unsplash images with a clean PHP class.
It's a really lightweight and simple PHP class that helps you to get easily any images from Unsplash.com while keeping your project clean.
Example
use PH7\Image\Unsplash; $unsplash = new Unsplash(); $unsplash->setWidth(600) ->setHeight(400) ->setQuality(80) ->setImageId('photo-1462045504115-6c1d931f07d1'); echo '<img src="' . $unsplash->getImage() . '">'; $unsplash->setImageId('photo-1500045992661-f978470eaf7b'); $unsplash->setFit(Unsplash::MAX_FIT); echo '<img src="' . $unsplash->getImage() . '">';
Installation
- Install Composer (https://getcomposer.org)
- Include it in your project:
composer require ph-7/image-unsplash
Requirements
- PHP 7.1 or higher
- Composer
Author
Made with ♥ and care by Pierre-Henry Soria
License
MIT License. Enjoy! 😃
统计信息
- 总下载量: 203
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-08-27