我正在开发一个 Laravel 应用程序,需要从数据库中获取内容。这些内容的数据类型是
这是我的代码:
视图
text
,以下是其中一段内容:
<span style="font-weight: bold; font-style: italic;">你的狗叫什么名字?</span>
你的狗叫什么名字?
而是显示了整段内容。<span style="font-weight: bold; font-style: italic;">What is your dog's name?</span>
它没有读取HTML标签。在格式上是否需要进行转换?当我查看源代码时,
<span style="font-weight: bold; font-style: italic;">What is your dog's name?</span>
这是我的代码:
视图
<table class="table table-striped table-bordered">
<tbody>
@foreach($questions as $key => $value)
<tr>
<td class="">{{ $value->Question }}</td>
</tr>
@endforeach
</tbody>
我的控制器:
public function create()
{
$questions = Question::where('IsEnabled', '=', 'Yes')->get();
return view('crm.create')->with(array('questions' => $questions));
}