I'm running the following iteration and getting the error Trying to get property of non-object , the code being:
@if(isset($propostas))
@foreach($propostas as $p)
<tr>
<td>{{$p->proposta}}</td>
<td>{{$p->descricao}}</td>
<td>{{$p->valor}}</td>
<td>{{$p->data}}</td>
<td>
<button style="border: 0px; background: transparent;" class="ver_proposta" value="{{$p->id}}">
<span class="glyphicon glyphicon-edit"></span>
</button>
</td>
<td>
<div class="form-group">
<select id="cbx_status" class="form-control">
<option value="Analise" {{$p->status->situacao == "Analise" ? 'selected' : ''}}>Analise</option>
<option value="Aprovado" {{$p->status->situacao == "Aprovado" ? 'selected' : ''}}>Aprovado</option>
<option value="Atualizado" {{$p->status->situacao == "Atualizado" ? 'selected' : ''}}>Atualizado</option>
<option value="Pausado" {{$p->status->situacao == "Pausado" ? 'selected' : ''}}>Pausado</option>
<option value="Finalizado" {{$p->status->situacao == "Finalizado" ? 'selected' : ''}}>Finalizado</option>
</select>
</div>
</td>
</tr>
@endforeach
@endif