public function view(UserPolicy $user, Tag $tag)
    {
        if ($user->canDo('news.tag.view') && $user->isAdmin()) {
            return true;
        }

        return $tag->user_id == user_id() && $tag->user_type == user_type();
    }
public function view(UserPolicy $user, Tag $tag)
    {
        if ($user->canDo('news.tag.view') && $user->isAdmin()) {
            return true;
        }

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

@param UserPolicy $user
@param Tag $tag

@return bool
Determine if the given user can view the tag .