2016-12-28 67 views
3

這是我的看法刀片:CSS在Laravel的刀片不加載(5.3)

@extends('emails.newlayout') 

@section('title', 'Reminder') 

@section('content') 
<?php $total = 0; ?>   
<table class="table table-striped"> 
<thead> 
<tr> 
<th>Name</th> 
<th>Amount</th> 
</tr> 
</thead> 
<tbody> 
@foreach ($sallary as $emp) 
<tr> 
<td>{{ $emp->employee['name'] }}</td> 
<td>{{ $emp['value'] }}</td> 
<?php $total += $emp['value']; ?> 
</tr> 
@endforeach 
</tbody> 
</table> 
<p>Total: US${{ $total }}</p> 
@stop 

這是我newlayout.blade.php的報頭內:

<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 

作品只是罰款我的瀏覽器,當我打開它爲HTML,但是當我在laravel上呈現它,它根本不加載引導CSS(加載其他所有內容)。我不知道我在做什麼錯了?

輸出

enter image description here

<table class="m_-7473167048951624218table m_-7473167048951624218table-striped"> 
<thead> 
<tr> 
<th>Name</th> 
<th>Value</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
<td>Test 2</td> 
<td>1,093.55</td> 
</tr> 
<tr> 
<td>Test 3</td> 
<td>1,090.33</td> 
</tr> 
</tbody> 
</table> 
+0

您在laravel上渲染後得到的輸出是什麼? – Dekel

+0

它應該的一切,*除了表格樣式,它應該從bootstrap加載。 – Rosenberg

+0

什麼是 - 提供**精確**輸出 – Dekel

回答

0

解決它

尷尬,但事實證明這是因爲電子郵件。每種風格都應該在電子郵件中內嵌css,否則根據關於在線樣式化郵件的大量文檔不能很好地呈現。