public function view(UserPolicy $user, Response $response)
    {
        if ($user->canDo('forum.response.view') && $user->isAdmin()) {
            return true;
        }

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

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

@param UserPolicy $user
@param Response $response

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