Error thrown

Call to undefined method WP_Post_Type::get_rest_controller()