Extracting Scalar Values
Sometimes we just want to get quick results without defining a class for the response model, especially if we’re trying to get a straight, simple answer in a form of string, integer, boolean or float. Instructor provides a simplified API for such cases.Scalar::string(), Scalar::boolean() and Scalar::float() to extract other types of values.
Additionally, you can use Scalar adapter to extract enums via Scalar::enum().