/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { $region = Region::findOrFail($id); $region->delete(); return redirect('region'); }
public function Eliminar($id) { $region = Region::findOrFail($id); $region->delete(); return redirect('config/region'); }
public function show_report2_non_government(Request $request) { $user = Auth::user(); $region = Region::findOrFail($user->region_id); $report_date = ReportDate::findOrFail($request->get('petsa')); $rpt2 = new RTAReport2NonGovernment($report_date->id, $user->region_id); switch ($request->get('report')) { case 0: $institutions = Institution::where('region_id', $region->id)->where('ownership', '!=', 'Public')->whereIn('id', NewEnrollee::where('report_date_id', $request->get('petsa'))->lists('institution_id'))->orderBy('name')->get(); return view('rtaadmin.show_rpt2nongov_1', compact('rpt2', 'region', 'report_date', 'institutions')); break; case 1: $institutions = Institution::where('region_id', $region->id)->where('ownership', '!=', 'Public')->whereIn('id', ReEnrollee::where('report_date_id', $request->get('petsa'))->lists('institution_id'))->orderBy('name')->get(); return view('rtaadmin.show_rpt2nongov_2', compact('rpt2', 'region', 'report_date', 'institutions')); break; case 2: $institutions = Institution::where('region_id', $region->id)->where('ownership', '!=', 'Public')->whereIn('id', Transferee::where('report_date_id', $request->get('petsa'))->lists('institution_id'))->orderBy('name')->get(); return view('rtaadmin.show_rpt2nongov_3', compact('rpt2', 'region', 'report_date', 'institutions')); break; case 3: $institutions = Institution::where('region_id', $region->id)->where('ownership', '!=', 'Public')->whereIn('id', Graduate::where('report_date_id', $request->get('petsa'))->lists('institution_id'))->orderBy('name')->get(); return view('rtaadmin.show_rpt2nongov_4', compact('rpt2', 'region', 'report_date', 'institutions')); break; case 4: $institutions = Institution::where('region_id', $region->id)->where('ownership', '!=', 'Public')->whereIn('id', ShortTermTrainee::where('report_date_id', $request->get('petsa'))->lists('institution_id'))->orderBy('name')->get(); return view('rtaadmin.show_rpt2nongov_5', compact('rpt2', 'region', 'report_date', 'institutions')); break; case 5: $institutions = Institution::where('region_id', $region->id)->where('ownership', '!=', 'Public')->whereIn('id', DropoutTransferee::where('report_date_id', $request->get('petsa'))->lists('institution_id'))->orderBy('name')->get(); return view('rtaadmin.show_rpt2nongov_6', compact('rpt2', 'region', 'report_date', 'institutions')); break; case 6: $institutions = Institution::where('region_id', $region->id)->where('ownership', '!=', 'Public')->whereIn('id', DropoutGraduate::where('report_date_id', $request->get('petsa'))->lists('institution_id'))->orderBy('name')->get(); return view('rtaadmin.show_rpt2nongov_7', compact('rpt2', 'region', 'report_date', 'institutions')); break; } }