Skip to content

Commit 2c109cc

Browse files
committed
2 parents 721ea4b + 125e853 commit 2c109cc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,19 @@ I think it's well documented, I will let you check it.
111111

112112
# Custom provider
113113

114-
If you want to add you personalized avatar provider, Follow the below steps:
114+
If you want to add your personalized avatar provider, Follow the below steps:
115115
1. Create a PHP class that implements a function `get(Model $user): string` (you can check `\Devaslanphp\FilamentAvatar\Core\GravatarProvider`)
116116
2. Add a new provider to `config('filament-avatar.providers')`, with `class` parameter where you will put your custom class (you can check the configuration file to make the same)
117117
3. Update the `config('filament.default_avatar_provider')` with your provider name
118118

119119
And that's it <img src="github-content/smiley.png" width="20px">.
120120

121+
## Pro tip
122+
123+
This package can be used outside of **Filament** too, you can add the trait `Devaslanphp\FilamentAvatar\Core\HasAvatarUrl` to your user model.
124+
125+
This trait will give you access to an appended attribute `avatarUrl` generated by the avatar provider, then you can use it as a `src` of your images.
126+
121127
## Credits
122128

123129
- [heloufir](https://github.com/heloufir)

0 commit comments

Comments
 (0)