In my ProfessionalProtroller.php file, I have the code:
public function vinculo($id)
{
$profissional = Profissional::find($id);
$unidades = Unidade::all();
$vinculos = Vinculo::where('profissional_id', '=', $id);
return view('profissionais.vinculo', compact('profissional', 'unidades', 'vinculos'));
}
It returns the fields and professional fields. But the links are not listed.
My link.blade.php file where links should appear:
@foreach($vinculos as $vinculo)
<tr>
<td>{{$vinculo->vinculo}}</td>
<td>{{$vinculo->cargo}}</td>
<td>{{$vinculo->funcao}}</td>
<td>{{$vinculo->horario}}</td>
<td>
<a href="{{route('vinculos.edit', $vinculo->id)}}"><i class="glyphicon glyphicon-pencil"></i></a>
<a href="{{route('vinculos.remove', $vinculo->id)}}"><i class="glyphicon glyphicon-trash"></i></a>
<a href="{{route('vinculos.show', $vinculo->id)}}"><i class="glyphicon glyphicon-zoom-in"></i></a>
</td>
</tr>
@endforeach