davidpiesse/nova-avatars

此包已被废弃且不再维护。未建议替代包。

额外的头像字段,如Identicon

0.0.3 2019-01-29 09:02 UTC

This package is auto-updated.

Last update: 2022-02-09 20:07:22 UTC


README

当Gravatar不是你想要的时候,提供额外的头像字段选项!

Identicon

包含的头像

  • Identicons

即将到来的头像

  • Adorable.io(可爱的怪物)
  • UI头像(首字母)

安装

composer require davidpiesse/nova-avatars

使用方法

此字段与内置的Gravatar字段完全相同——但用于Identicons。

在你的Nova资源(例如用户)中

use Davidpiesse\NovaAvatars\Identicon;

public function fields(Request $request)
    {
        return [
            ...
            Identicon::make(),
            ...
        ]
    }
// Using the "email" column...
Identicon::make()

// Using the "email_address" column...
Identicon::make('Avatar', 'email_address')
// Using the "email" column...
Initials::make()

// Using the "email_address" column...
Initials::make('Avatar', 'email_address')

你可以发布配置

php artisan vendor:publish --provider="Laravolt\Avatar\ServiceProvider"