我有一个类似的代码
@foreach($modelas$rows)
<tr>
<td>{{ $i++}}</td>
<td>
{{
Employee::where('nik','=',$rows->nik)->first(['nama'])
}}
</td>
<td>{{ $rows->nik }}</td>
<td>
{!! HTML::link('employee/profile_app/'.$rows->nik,'view', array('class'=>'fa fa-pencil-square-o action-button')) !!}
</td>
</tr>
@endforeach
结果是这样的在此处输入图像描述
如何隐藏"nama"变量
@foreach ($model as $rows)
<tr>
<td>{{ $i++}}</td>
<td>
{{
Employee::where('nik','=',$rows->nik)->first(['nama'])->nama
}}
</td>
<td>{{ $rows->nik }}</td>
<td>
{!! HTML::link('employee/profile_app/'.$rows->nik,'view', array('class'=>'fa fa-pencil-square-o action-button')) !!}
</td>
</tr>
@endforeach