how to show dropdown data when edit? I'm using laravel and ajax

45 Views Asked by At

I don't know how to say it. but

I wanna to edit this data, but why does the select/dropdown form not show the data before? this is my page

by the way, my CRUD just in one page index

Please help me

this is my Controller this is my controller enter image description here

And this is my blade file enter image description here

this is my Ajax syntax to edit the data enter image description here

I hope to find a way soon. Or at least someone provides a reference to overcome this problem

1

There are 1 best solutions below

0
arya_la On

in your blade file just in your select div write the code check if the $prove id is similar to the $tkpmst id like below:

@if($tkmst_kostas->id == $prov->id) selected @endif