-
Notifications
You must be signed in to change notification settings - Fork 3
/
laravatar.php
64 lines (60 loc) · 2.6 KB
/
laravatar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Avatar Driver
|--------------------------------------------------------------------------
| This option defines the default avatar driver that will be used to
| generate the avatars. Laravatar provides a default driver to generate
| avatars using Gravatar. You can create your own driver by implementing
| the AvatarInterface contract.
|
| Supported: "gravatar", "boringavatar", "dicebear", "ui-avatars",
|
*/
'default' => env('LARAVATAR_DRIVER', 'gravatar'),
/*
|--------------------------------------------------------------------------
| Avatar Drivers
|--------------------------------------------------------------------------
| Here you can define the configuration for each avatar driver. You can
| define the driver class, the driver options. Once you change the config
| you need to clear the config cache.
|
*/
'drivers' => [
'gravatar' => [
'class' => \AmplifiedHQ\Laravatar\Drivers\Gravatar::class,
'options' => [
'size' => 96,
],
],
'boringavatar' => [
'class' => \AmplifiedHQ\Laravatar\Drivers\BoringAvatar::class,
'options' => [
'size' => 96,
'variant' => 'marble', /** @see \AmplifiedHQ\Laravatar\Drivers\BoringAvatar::$variants for supported variants */
'squared' => false,
],
],
'dicebear' => [
'class' => \AmplifiedHQ\Laravatar\Drivers\DiceBear::class,
'options' => [
'size' => 96,
'style' => 'avataaars', /** @see \AmplifiedHQ\Laravatar\Drivers\DiceBear::$styles for supported styles */
'format' => 'svg', /** @see \AmplifiedHQ\Laravatar\Drivers\DiceBear::$formats for supported formats */
],
],
'ui-avatars' => [
'class' => \AmplifiedHQ\Laravatar\Drivers\UiAvatars::class,
'url' => 'https://ui-avatars.com/api/',
'options' => [
'size' => 96,
'rounded' => false,
'format' => 'png', /** @see \AmplifiedHQ\Laravatar\Drivers\UiAvatars::$formats for supported formats */
// 'background' => 'ffffff', # Note: If you set a color, all generated avatars will have the same background color.
// 'color' => '000000', # Note: If you set a background color, all generated avatars will have the same background color.
],
],
],
];