定制 luckyboy1001/avatarate 二次开发

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

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

luckyboy1001/avatarate

Composer 安装命令:

composer require luckyboy1001/avatarate

包简介

Package built for create avatars from text(username, ...)

README 文档

README

Demo Of Name Like This Mana Lovez : demo

With this package you can easily generate profile photos in different formats (for now just png)

installation

composer require luckyboy1001/avatarate

config the package

just create the directory and give the path on config file of package (avatarate)

Notice: PHP 7.4 is needed

publish config

php artisan vendor:publish --provider=Avatarate\AvatarateServiceProvider

avatarate.php will be published to your config directory

- more options will be added

notice

after config the avatarate config file you must give it a save_directory that should be

  • created before
  • writeable

example

    $name = "Mohammad Mohammadi";
    
    $background_color = 'random'; 
    
    $text_color = [220, 120, 12, 1]; // rgb or rgba or random
    
    $shape = "circle"; // rectangle, circle
    
    $size = 240;


    $image = new \Avatarate\Services\AvatarBuilder(
        $name,
        $background_color,
        $text_color,
        $shape,
        $size
    );

    $result = $image->generate();
    

result :

{
    status: "success",
    file_name: "avatarate-1634383742",
    path: "path-to-laravel-project/public/avatarate/avatarate-1634383742.png"
}

and then image is saved in the directory you have given to config file of the package

Notice

this package developed based on an open source laravel project I decided to improve it and add new features

- to do

  • unit tests
  • new features

please give me a star if you like it

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2021-10-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固