Laravel 4 在何处以及如何更改此数据?

Laravel 4 在何处以及如何更改此数据?,laravel-4,eloquent,Laravel 4,Eloquent,下面的代码运行良好,只是在一个实例中对数据进行了一些“清理”,而在另一个实例中,我无法破译 我有一个表(clientdocs),其中有一个字段“from”,其中包含以下格式的字符串数据: Richard Robinson <richard@gmail.com> 我还从表中检索所有数据并将其传递给视图(以及上面的数组和其他内容): 现在,在我看来: 我使用$sender_sel作为: {{ Form::select('from', $sender_sel, '', array( 'c

下面的代码运行良好,只是在一个实例中对数据进行了一些“清理”,而在另一个实例中,我无法破译

我有一个表(clientdocs),其中有一个字段“from”,其中包含以下格式的字符串数据:

Richard Robinson <richard@gmail.com>
我还从表中检索所有数据并将其传递给视图(以及上面的数组和其他内容):

现在,在我看来:

我使用$sender_sel作为:

{{ Form::select('from', $sender_sel, '', array(
'class' => 'form-control'
)) }}
并按预期显示:

"Richard Robinson <richard@gmail.com>"
“理查德·罗宾逊”
我还使用了第二次查询的数据(docs对象):


日期
从…起
类型
@foreach($docs作为$doc)
{{$doc->from}
@endforeach
以下是提示:$docs->from显示为

"Richard Robinson", without the "<richard@gmail.com>"
“Richard Robinson”,不带“”

知道为什么吗?

查看源代码。它仍然存在,但是
是HTML中的特殊字符(因为它们在HTML标记中使用)

使用三个方括号将转义Blade中的输出,因此
{{{{{$doc->from}}}
将通过将其转换为
来修复它

"Richard Robinson <richard@gmail.com>"
<table class="table table-striped table-hover">
    <tr>
        <th>Date</th>
        <th>From</th>
        <th>Type</th>
    </tr>
    @foreach ($docs as $doc)
        <?php $detail_url = 'clientdocs/' . $doc->id . '/edit' ; ?>
        <tr>
            <td>{{ $doc->from }}</td>
        </tr>                       
    @endforeach
</table>
"Richard Robinson", without the "<richard@gmail.com>"