Skip to content

Commit af1d45a

Browse files
committed
Small tweaks
1 parent 67ee4a9 commit af1d45a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,22 @@ class User extends Model implements Commenter
191191
}
192192
```
193193

194+
### Configuring the Commenter avatar
195+
196+
To configure the avatar, make sure your User model implements Filament's `HasAvatar` interface.
197+
198+
```php
199+
use Filament\Models\Contracts\HasAvatar;
200+
201+
class User extends Authenticatable implements Commenter, HasName, HasAvatar
202+
{
203+
public function getFilamentAvatarUrl(): ?string
204+
{
205+
return $this->avatar_url;
206+
}
207+
}
208+
```
209+
194210
### Events
195211

196212
Two events are dispatched when a comment is created or reacted to:

resources/views/comments.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<x-filament::button
1818
wire:click="save"
1919
size="sm"
20-
>Save</x-filament::button>
20+
>Comment</x-filament::button>
2121

2222
<x-filament::button
2323
x-on:click="wasFocused = false"

0 commit comments

Comments
 (0)