@lovercode do you have anything that groups/identifies all of the Faktor instance together; e.g. a UUID? This would make it easier to display all of the items together that belong together.
Aside, I don't understand what the ad method means to do - it is not clear if you are persisting these items in the database to represent an Order's items or something like that? Similarly, the last line before the redirect; what it that doing?
public function ad(Request $request,$id)
{
$products = $request->session()->get('cart',$id);
$faktor = [];
foreach ($products as $product) {
$faktor [] = Faktor::create([
'user_id' => Auth::id(),
'product_id' => $product['product_id'],
'name' => $product['name'],
'quantity' => $product['quantity'],
'price' => $product['price'],
]);
}
Faktor::create($faktor); // what is this????
return redirect('bill',compact('faktor'));
}