【发布时间】:2017-01-17 10:31:44
【问题描述】:
这是larval中的pdf刀片文件。它给 ?在pdf文件中标记。
@section('css')
<meta name="viewport" content="width=device-width, initial-scale=1" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="https://fonts.googleapis.com/css?family=Noto+Sans" rel="stylesheet">
<style>
@font-face {
font-family: 'Noto Sans', sans-serif;
font-style: normal;
font-weight: 400;
}
</style>
@endsection
@section('js')
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
@endsection
<div class="container">
<h2>Leave Request Information</h2>
<h3>Month - {{$month}} {{$year}}</h3>
<br/>
@if(isset($leavesRequest) && count($leavesRequest)>0)
<table style="width:100%" border="1" cellspacing="0">
<thead>
<tr>
<th>S No.</th>
<th>अध्यापक कर्मचारी का नाम और पद</th>
<th>Name of school</th>
<th>Leave Type</th>
<th>Leave Status</th>
<th>Year</th>
<th>Month</th>
<th>Total Days</th>
</tr>
</thead>
<tbody>
<?php $i = 0; ?>
@foreach($leavesRequest as $status)
<?php ++$i; ?>
<tr>
<td style="text-align: center"><?php echo $i;?></td>
<td style="text-align: center"><?php echo $status->teacher->name;?></td>
<td style="text-align: center"><?php echo $status->school->name;?></td>
<td style="text-align: center">{{$status->leave_type}}</td>
<td style="text-align: center">{{$status->leave_status}}</td>
<td style="text-align: center">{{$status->leave_year}}</td>
<td style="text-align: center">{{$status->month_name}}</td>
<td style="text-align: center">{{$status->total_days}}</td>
</tr>
@endforeach
</tbody>
</table>
@else
No data found
@endif
</div>
生成的 PDF 如下所示:
【问题讨论】: