Beispiel #1
0
 public function getDivisiOrKprk(Request $request)
 {
     if ($request->input('type') == 'reg') {
         $office_region = RegionKPRK::select(\DB::raw("CONCAT(code,'-',name) AS full_name, id"))->where('region_id', '=', $request->input('id'))->lists('full_name', 'id');
     } else {
         $office_region = OfficeDivision::select(\DB::raw("CONCAT(code,'-',name) AS full_name, id"))->where('office_id', '=', $request->input('id'))->lists('full_name', 'id');
     }
     return Response::json($office_region);
 }
 public function edit_kpc($id, $id_kpc)
 {
     $regionKPRK = RegionKPRK::where('region_kprks.id', $id)->first();
     $regionKPC = RegionKPC::find($id_kpc);
     return view('regions.edit_kpc', compact('regionKPRK', 'regionKPC'));
 }