getKey() == $comment->commenter_id) || $user->is_admin; } /** * Can user update the comment * * @param $user * @param Comment $comment * @return bool */ public function update($user, Comment $comment) : bool { return $user->getKey() == $comment->commenter_id; } /** * Can user reply to the comment * * @param $user * @param Comment $comment * @return bool */ public function reply($user, Comment $comment) : bool { return $user->getKey() != $comment->commenter_id; } }