03.12.2015 Views

laravel4cookbook

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

E-Commerce 283<br />

61 Quantity<br />

62 Amount<br />

63 <br />

64 <br />

65 <br />

66 @foreach ($order->orderItems as $orderItem)<br />

67 <br />

68 <br />

69 {{ $orderItem->product->name }}<br />

70 <br />

71 <br />

72 {{ $orderItem->quantity }}<br />

73 <br />

74 <br />

75 $ {{ number_format($orderItem->total, 2) }}<br />

76 <br />

77 <br />

78 @endforeach<br />

79 <br />

80 &nbsp;<br />

81 <br />

82 Total<br />

83 <br />

84 <br />

85 $ {{ number_format($order->total, 2) }}<br />

86 <br />

87 <br />

88 <br />

89 <br />

90 <br />

91 <br />

92 <br />

93 <br />

94 <br />

.<br />

This file should be saved as app/views/email/invoice.blade.php.<br />

This view just displays information about the order, including items, totals and a grand total. I’ve<br />

avoided using Bootstrap since it seems to kill DOMDPF outright. The magic, however, is in how the<br />

PDF document is generated:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!