Guest User

Untitled

a guest
Aug 18th, 2019
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class PrintController extends Controller
  2. {
  3. public function getPrinten($id)
  4. {
  5. $bestelling = session()->get('bestelling')->find($id);
  6. $items = $bestelling->cart->items;
  7.  
  8. foreach ($items as $item=>$value) {
  9. // dd($items);
  10. $html = $value['item']['naam'];
  11. $dompdf = new Dompdf();
  12. $dompdf->loadHtml($html);
  13. $dompdf->render();
  14. $dompdf->stream();
  15. }
  16.  
  17. }
  18.  
  19. }
  20.  
  21. array:3 [▼
  22. 1 => array:3 [▶]
  23. 3 => array:3 [▶]
  24. 4 => array:3 [▶]
  25. ]
  26.  
  27. array:3 [▼
  28. "qty" => 1
  29. "prijs" => 2
  30. "item" => Drank {#279 ▶}
  31. ]
RAW Paste Data