我的问题很简单
我正在尝试调用img文件夹中我的公共文件夹中的此源:
src="img/vcc3logo.png"但我不能在pdf打印表单上显示它
当客户打印认证表单时,需要显示图像。resources/views/customer-relations/dashboard/print.blade.php中包含print.blade.php的文件
下面是我的print.blade.php中的代码
{{-- <div class="content">
<div class="clearfix"></div>
<div class="box-body"> --}}
<img src="" height="50" width="50" style="float: right">
<img src="img/vcc3logo.png" height="50" width="50" style="float: left">
<div class="container">
<div class="row">
<div class="text-center">
<p class="text-center maliit">
Republic of the Philippines<br>
National Capital Region<br>
<font>City Government of Valenzuela</font><br>
Office of the City Mayor<br>
Valenzuela City Command and Communications Center<br>
2nd Floor, City ALERT Center, Mc-Arthur Hi-way, Malinta, Valenzuela City<br>
</p>
<h3>Application Number:{{ $application_number }}</h3>
</div>
<h5><b>Business Name:</b> {{ $business_name }}</h5>
<h5><b>Owner:</b> {{ $owner }}</h5>
<h5><b>Location:</b> {{ $location }}</h5>
</span>
<table class="table table-hover">
<thead>
<tr>
<th>Fees</th>
<th></th>
<th class="text-center"></th>
<th class="text-center"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="col-md-9"><em>Inspection Fee:</em></h4></td>
<td class="col-md-1" style="text-align: center"></td>
<td class="col-md-1 text-center"></td>
<td class="col-md-1 text-center">{{ $inspection_fee }}</td>
</tr>
<tr>
<td class="col-md-9"><em>Certificate Fee:</em></h4></td>
<td class="col-md-1" style="text-align: center"></td>
<td class="col-md-1 text-center"></td>
<td class="col-md-1 text-center">{{ $cert_fee }}</td>
</tr>
<tr>
<td class="col-md-9"><em>Local Fee:</em></h4></td>
<td class="col-md-1" style="text-align: center"></td>
<td class="col-md-1 text-center"></td>
<td class="col-md-1 text-center">{{ $local_fee }}</td>
</tr>
<tr>
<td class="col-md-9"><em>Others Fee:</em></h4></td>
<td class="col-md-1" style="text-align: center"></td>
<td class="col-md-1 text-center"></td>
<td class="col-md-1 text-center">{{ $others_fee }}</td>
</tr>
</tbody>
</table>
<p><i>Note: Please print and present to Customer Relations Officer</i></p>
</td>
</div>
{{-- </div>
</div>
</div>
--}}我试着把它改成
src="url('/img/cctv_camera.jpg')"但最终出现了这个错误:
(1/1) RuntimeException退出状态代码'1‘表示出了问题: stderr:“正在加载页面(1/6)
发布于 2017-08-09 10:37:31
如果图像文件位于公共文件夹内,则需要添加asset(),它提供图像的完整路径,如下所示
<img src="{{asset('/img/vcc3logo.png')}}" height="50" width="50" style="float: left">发布于 2017-08-09 14:05:08
我想你可以试试这个,希望对你有帮助:
<img src="{{url('')}}/img/vcc3logo.png" height="50" width="50" style="float: left">或
<img src="{{asset('/img/vcc3logo.png')}}" height="50" width="50" style="float: left">希望这对你有用!
https://stackoverflow.com/questions/45580778
复制相似问题