2016-08-05 47 views
0

Ich habe einen Code wie untenWie variabel in Laravel verstecken

@foreach ($ Modell als $ 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 

und das Ergebnis ist wie folgt enter image description here

Wie zu verstecken dass "nama" Variable

+0

Was meinst du mit "verstecken"? Was ist die erwartete Ausgabe? –

Antwort

1
@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