Level 51
Can this article help you
http://daylerees.com/codebright-eloquent-collections/
Read about merge() where you have example
1 like
What's the best way to add multiple elements to a collection.
e.g. ($this->order_items) is a collection. I want to append another collection.
public function setOrderItems($order_item_list)
{
Order\OrderItem::whereIn('id', $order_item_list)->get()->each(function (Order\OrderItem $order_line) {
$this->order_items->push($order_line);
});
}
Please or to participate in this conversation.