Laravel Collection Public API: jsonSerialize
jsonSerialize The jsonSeralize method internally returns the value of the toArray method. This method exists to implement PHP's JsonSerializable interface, which allows developers to customize how a class is represented when using the json_encode...