1<!DOCTYPE html>
2<html>
3
4<head>
5 <title>Danh sách sản phẩm</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <style type="text/css">
8 * {
9 font-family: DejaVu Sans, sans-serif;
10 }
11
12 body {
13 font-size: 10px;
14 }
15
16 table {
17 border-collapse: collapse;
18 }
19
20 td {
21 vertical-align: middle;
22 }
23
24 caption {
25 font-size: 20px;
26 font-weight: bold;
27 text-align: center;
28 }
29
30 .hinhSanPham {
31 width: 100px;
32 height: 100px;
33 }
34
35 .companyInfo {
36 font-size: 13px;
37 font-weight: bold;
38 text-align: center;
39 }
40
41 .companyImg {
42 width: 200px;
43 height: 200px;
44 }
45
46 .page-break {
47 page-break-after: always;
48 }
49 </style>
50</head>
51
52<body>
53 <div class="row">
54 <table border="0" align="center">
55 <tr>
56 <td class="companyInfo">
57 Công ty Nền tảng<br />
58 http://sunshine.com/<br />
59 (0292)3.888.999 # 01.222.888.999<br />
60 <img src="{{ asset('img/logo-nentang.jpg') }}" class="companyImg" />
61 </td>
62 </tr>
63 </table>
64 <br />
65 <br />
66 <?php
67 $tongSoTrang = ceil(count($danhsachsanpham)/5);
68 ?>
69 <table border="1" align="center" cellpadding="5">
70 <caption>Danh sách sản phẩm</caption>
71 <tr>
72 <th colspan="6" align="center">Trang 1 / {{ $tongSoTrang }}</th>
73 </tr>
74 <tr>
75 <th>STT</th>
76 <th>Hình sản phẩm</th>
77 <th>Tên sản phẩm</th>
78 <th>Giá gốc</th>
79 <th>Giá bán</th>
80 <th>Loại sản phẩm</th>
81 </tr>
82 @foreach ($danhsachsanpham as $sp)
83 <tr>
84 <td align="center">{{ $loop->index + 1 }}</td>
85 <td align="center">
86 <img class="hinhSanPham" src="{{ asset('storage/photos/' . $sp->sp_hinh) }}" />
87 </td>
88 <td align="left">{{ $sp->sp_ten }}</td>
89 <td align="right">{{ $sp->sp_giaGoc }}</td>
90 <td align="right">{{ $sp->sp_giaBan }}</td>
91 @foreach ($danhsachloai as $l)
92 @if ($sp->l_ma == $l->l_ma)
93 <td align="left">{{ $l->l_ten }}</td>
94 @endif
95 @endforeach
96 </tr>
97 @if (($loop->index + 1) % 5 == 0)
98 </table>
99 <div class="page-break"></div>
100 <table border="1" align="center" cellpadding="5">
101 <tr>
102 <th colspan="6" align="center">Trang {{ 1 + floor(($loop->index + 1) / 5) }} / {{ $tongSoTrang }}</th>
103 </tr>
104 <tr>
105 <th>STT</th>
106 <th>Hình sản phẩm</th>
107 <th>Tên sản phẩm</th>
108 <th>Giá gốc</th>
109 <th>Giá bán</th>
110 <th>Loại sản phẩm</th>
111 </tr>
112 @endif
113 @endforeach
114 </table>
115 </div>
116</body>
117
118</html>