Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PrintController extends Controller
- {
- public function getPrinten($id)
- {
- $bestelling = session()->get('bestelling')->find($id);
- $items = $bestelling->cart->items;
- foreach ($items as $item=>$value) {
- // dd($items);
- $html = $value['item']['naam'];
- $dompdf = new Dompdf();
- $dompdf->loadHtml($html);
- $dompdf->render();
- $dompdf->stream();
- }
- }
- }
- array:3 [▼
- 1 => array:3 [▶]
- 3 => array:3 [▶]
- 4 => array:3 [▶]
- ]
- array:3 [▼
- "qty" => 1
- "prijs" => 2
- "item" => Drank {#279 ▶}
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement