You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add support for Filament 4
* Update README to be more clear
* Remove extraneous modal buttons
* Make light mode borders consistent
* Partially fix comment delete not working in comment modals
* Style fix
#### Configuring the User model and the mentionables
103
117
104
118
If your `User` model lives in a different namespace than `App\Models\User`, you can configure it in `config/commentions.php`:
105
119
@@ -109,7 +123,7 @@ If your `User` model lives in a different namespace than `App\Models\User`, you
109
123
],
110
124
```
111
125
112
-
### Configuring the Comment model
126
+
####Configuring the Comment model
113
127
114
128
If you need to customize the Comment model, you can extend the `\Kirschbaum\Commentions\Comment` class and then update the `comment.model` option in your `config/commentions.php` file:
115
129
@@ -120,20 +134,20 @@ If you need to customize the Comment model, you can extend the `\Kirschbaum\Comm
120
134
],
121
135
```
122
136
123
-
### Configuring Comment permissions
137
+
####Configuring Comment permissions
124
138
125
139
By default, users can create comments, as well as edit and delete their own comments. You can adjust these permissions by implementing your own policy:
126
140
127
-
#### 1) Create a custom policy
141
+
#####1) Create a custom policy
128
142
129
143
```php
130
144
namespace App\Policies;
131
145
132
146
use Kirschbaum\Commentions\Comment;
133
147
use Kirschbaum\Commentions\Contracts\Commenter;
134
-
use Kirschbaum\Commentions\Policies\CommentPolicy;
148
+
use Kirschbaum\Commentions\Policies\CommentPolicy as CommentionsPolicy;
135
149
136
-
class CommentPolicy extends CommentPolicy
150
+
class CommentPolicy extends CommentionsPolicy
137
151
{
138
152
public function create(Commenter $user): bool
139
153
{
@@ -152,7 +166,7 @@ class CommentPolicy extends CommentPolicy
152
166
}
153
167
```
154
168
155
-
#### 2) Register your policy in the configuration file
169
+
#####2) Register your policy in the configuration file
156
170
157
171
Update the `comment.policy` option in your `config/commentions.php` file:
Commentions supports polling for new comments. You can enable it on any component by calling the `pollingInterval` method and passing the number of seconds.
283
+
Commentions supports polling for new comments. You can enable it on any component by calling the `poll` method and passing the desired interval.
0 commit comments