vendredi 8 novembre 2019

Href in laravel foreach only return the last record in array

`@foreach($empdata as $emphistory) @if($emphistory->canRefer==true||$emphistory->canRefer==false) @php $time = strtotime($emphistory->employmentStartDate); $startdate = date('d-M-Y',$time); $etime=strtotime($emphistory->employementTill); $enddate=date('d-M-Y',$etime); @endphp

                                        <a href="/empProfileHistory//"> <button type="button" class="btn btn-outline-primary btn-rounded waves-effect btn-sm"><i class="fa fa-edit float-right" aria-hidden="true"></i></button></a>
                                        <a href="/DeleteEmployee/"> <button type="button" class="btn btn-outline-danger btn-rounded waves-effect btn-sm"><i class="fa fa-trash float-right" aria-hidden="true"></i></button></a>


                                    </td>
                                </tr>
                            @endif
                        @endforeach`

i have an array serving multiple purpose,edit and delete using href,when try to update the row href link only returns the last row,others are showing not found`enter



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire