docs: update all documentation for refactored naming conventions
- CanComment trait replaces IsCommenter - Commentator interface replaces Commenter - Models moved to Models\ namespace (Comment, Reaction, Attachment, Subscription) - commenter_type/commenter_id columns replace user_type/user_id - CommentsConfig replaces Config class - table_names config key replaces tables - getCommentDisplayName() replaces getCommentName()
This commit is contained in:
@@ -61,17 +61,17 @@ Users can toggle their subscription using the subscribe/unsubscribe button in th
|
||||
### Programmatic Access
|
||||
|
||||
```php
|
||||
use Relaticle\Comments\CommentSubscription;
|
||||
use Relaticle\Comments\Models\Subscription;
|
||||
|
||||
// Check subscription status
|
||||
CommentSubscription::isSubscribed($commentable, $user);
|
||||
Subscription::isSubscribed($commentable, $user);
|
||||
|
||||
// Subscribe/unsubscribe
|
||||
CommentSubscription::subscribe($commentable, $user);
|
||||
CommentSubscription::unsubscribe($commentable, $user);
|
||||
Subscription::subscribe($commentable, $user);
|
||||
Subscription::unsubscribe($commentable, $user);
|
||||
|
||||
// Get all subscribers for a commentable
|
||||
$subscribers = CommentSubscription::subscribersFor($commentable);
|
||||
$subscribers = Subscription::subscribersFor($commentable);
|
||||
```
|
||||
|
||||
## Events
|
||||
|
||||
Reference in New Issue
Block a user