div-art/avatar
Composer 安装命令:
composer require div-art/avatar
包简介
A Laravel 5.5 avatar creator
README 文档
README
Avatar Generator package for Laravel 5.5
Installation
To install, run the following in your project directory:
$ composer require div-art/avatar
Then in config/app.php add the following to the providers array:
\DivArt\Avatar\AvatarServiceProvider::class,
Also in config/app.php, add the Facade class to the aliases array:
'Avatar' => \DivArt\Avatar\Facades\Avatar::class,
Configuration
To publish Avatar's configuration file, run the following vendor:publish command:
php artisan vendor:publish --provider="DivArt\Avatar\AvatarServiceProvider"
This will create a avatar.php in your config directory.
Usage
Be sure to include the namespace for the class wherever you plan to use this library
use DivArt\Avatar\Facades\Avatar;
Fonts
Add your fonts to public/fonts.
Code Examples
$avatar = Avatar::make('John Doe'); $avatar->save();
Method chaining
$avatar = Avatar::make('John Doe')->size(100)->shape('square')->format('png')->save('avatarName');
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-24