承接 vinicius73/laravel-instantavatar 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vinicius73/laravel-instantavatar

Composer 安装命令:

composer require vinicius73/laravel-instantavatar

包简介

Create a very pretty random avatars with ease. Package for Laravel

README 文档

README

Create a very pretty random avatars with ease.

installation

Add the new required package in your composer.json

"vinicius73/laravel-instantavatar": "~1.1"

Run composer update or php composer.phar update.

After composer command, add new service provider in app/config/app.php :

Vinicius73\IAvatar\IAvatarServiceProvider::class,

Now, add new aliases in app/config/app.php.

'IAvatar' => Vinicius73\IAvatar\Facade\IAvatarFacade::class,

Finally publish the configuration file of the package php artisan vendor:publish

Usage

/**
 * Creates the image. Only the first letter will be passed to the image.
 * Ex.:
 * 'My String' -> output My
 * You can change this in the settings
 */
$avatar = IAvatar::random('My String');

/**
 * Save imagem in path
 * You can use `public::` Omit the full address /public
 */
$avatar->save('public::path/to/file.png');

/**
 * Output image in browser
 */
$avatar->display();
IAvatar::random('Vinicius')->save('public::avatars/vinicius.png')->display();

Configuration

return array(
    'width'    => 150,
    'heigth'   => 150,
    'fontsize' => 80, // in px
    'chars'    => 2, // Character limit for every image
    'font' => array( // You can register or remove more sources with ease.
        'InstantAvatar::Comfortaa-Regular.ttf',
        'InstantAvatar::Roboto-Regular.ttf',
        'InstantAvatar::Ubuntu-Regular.ttf',
        'InstantAvatar::DroidSans.ttf'
    ),
    'overlay'  => 'InstantAvatar::glass.png', // A watermark that overlays the image
    'flat'     => false // Enables the flat mode
);

Demo

Default

Instant Avatar

Flat

Color based in avatarly

Instant Avatar Flat

统计信息

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

GitHub 信息

  • Stars: 28
  • Watchers: 3
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-08-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固