How to hide variable in laravel

I have a code like below

@foreach ($model as $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

and the result is like this enter image description here

How to hide that "nama" variable

Upvotes: 0

Views: 237

Answers (1)

Wouter Van Damme
Wouter Van Damme

Reputation: 781

@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

Upvotes: 1

Related Questions