PostPolicy
class PostPolicy (View source)
Methods
bool
create()
Any user can create a post.
bool
bool
bool
bool
bool
bool
react()
Any user can react to a post.
Details
__construct(PermissionCollection $permissions)
No description
bool
create()
Any user can create a post.
bool
moderate(User $user, Post $post)
Users can moderate a post and its comments if they have permission.
bool
edit(User|null $user, Post $post)
Users can edit their own posts. Users with the moderate
ability can
edit any posts.
bool
delete(User $user, Post $post)
Users can delete their own posts if they're uncommented on. Users with
the moderate
ability can delete any posts.
bool
move(User $user, Post $post)
Users can move their own posts if they're uncommented on. Users with
the moderate
ability can move any posts.
bool
comment(User $user, Post $post)
Users can comment on a post if they have permission and the post is not locked.
bool
react()
Any user can react to a post.