Answer the question
In order to leave comments, you need to log in
How to paginate a modified collection in Laravel 5?
This code, when the barcode field matches in both arrays, adds the $r_item array to $task->items in the data field,
foreach ($task->items as $key => $item){
foreach ($r_items as $r_item) {
if ($item->barcode == $r_item->barcode) {
$item->data = $r_item;
}
}
}
Answer the question
In order to leave comments, you need to log in
It is necessary to filter during selection from basis, instead of after.
If I understand correctly what you have going on.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question