I want to add new element in $items array, I don't want to use joins for certain reasons.
$items = DB::select(DB::raw('SELECT * FROM items WHERE items.id = '.$id.' ;'));
foreach($items as $item){
$product = DB::select(DB::raw(' select * from product
where product_id = '. $id.';' ));
$item->push($product);
}
what should i do, please help, thnx in advance
It looks like you have everything correct according to Laravel docs, but you have a typo
Should be
I also want to think the actual method you're looking for is
put