RecordSerializer
is made available through the packages built-in your admin panel..serialize()
method that takes as an argument an array of objects (or a single object). In the smart collection example, this array would be as such:.serialize()
method like this:email
. We would then adapt the smart collection definition to include a field customer
referencing the customers
collection:customer
), following this structure:customer
relationship is clearly indicated under the relationships
attribute. Also note that the customer is automatically wrapped in the included
section, with its attributes if you specified some (only id
in this case).