定制 humans/avatars 二次开发

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

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

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2024-03-15