public function update(UserPolicy $user, Comment $comment)
    {
        if ($user->canDo('news.comment.edit') && $user->isAdmin()) {
            return true;
        }

        return $comment->user_id == user_id() && $comment->user_type == user_type();
    }
public function update(UserPolicy $user, Comment $comment)
    {
        if ($user->canDo('news.comment.edit') && $user->isAdmin()) {
            return true;
        }

        return $comment->user_id == user_id() && $comment->user_type == user_type();
    }
public function update ( UserPolicy $ user , Comment $ comment ) { if ( $ user -> canDo ( 'news.comment.edit' ) && $ user -> isAdmin ( ) ) { return true ; } return $ comment -> user_id == user_id ( ) && $ comment -> user_type == user_type ( ) ; }
Determine if the given user can update the given comment.

@param UserPolicy $user
@param Comment $comment

@return bool
Determine if the given user can update the given comment .