Hello! I have two models: Number and Order. Order has many Numbers, so Number belongs to Order.
I need to:
$numbers = Number::find(); ... echo json_encode($numbers);
I can use $number->order .. and it works fine. But how can I populate the array with all related data, so I can send it via JSON?