humans/avatars
最新稳定版本:1.1.0
Composer 安装命令:
composer require humans/avatars
包简介
README 文档
README
This package allows downloads from multiple providers and it returns the first successful result.
Setup
composer require humans/avatars
Usage
This will return the first successful photo.
use Humans\Avatars\Facades\Avatars; use Humans\Avatars\Attempt; use Humans\Avatars\Providers; $response = Avatars::attempt( new Providers\Unavatar('jaggy@humans.ph'), new Providers\Unavatar('jaggy'), new Providers\Unavatar('jaggy@hey.com'), new Providers\UiAvatars('Jaggy Gauran'), ); $response->contents; $response->extension;
Testing
Avatars provides two testing fakes to make testing a lot easier.
Force a success with specific contents
Avatars::pass('example image content', 'gif');
Force the avatar to fail
Avatars::fail();
统计信息
- 总下载量: 1.24k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2024-03-15