Open mohammad-ammad opened 11 months ago
return view("admin.pages.edit_school")->with('provinces', $province)->with('school', $school); sir after view file path ->with ->with('provinces', $province)->with('school', $school) i didnt understand this.
sir theres no table of location in db kindly tell me in which tble the location is inserted
Here is the quick hint !!
First create route in web.php like route::get('/location/edit/{province_id}/{district_id}/{tehsil_id}/{city_id}/{area_id}/{subarea_id}', [controller::class, 'edit view']);
Second in the edit_view controller function apply this logic.
public function edit_view($province_id,district_id,tehsil_id,city_id,area_id,subarea_id) {
$province = Province::where('province_id',$province_id)->get();
$district = District::where('district_id',$district_id)->get();
// same for rest of the models
// next step is to show dropdown data
$all_provinces = Province::get();
// same for rest of the models
return view("admin.pages.edit_location")->with('province', $province)->with('district', $district);
}
---------- NOTE -------------
sir i have done it till get data from model for each and now for dropdown ..
Task is split into the following parts
--------------IMPORTANT-------------------