Example #1
0
 public function dashboard()
 {
     $ramos = Ramo::all(['nombre_ramo']);
     $oficinas = Oficina::all(['oficina']);
     $polizas = Poliza::all();
     return view('panel.dashboard', compact('ramos', 'oficinas', 'polizas'));
 }
Example #2
0
 /**
  * @param Request $request
  * @return \Illuminate\Http\JsonResponse
  */
 public function getRamos(Request $request)
 {
     $ramo = $request->input('ramo');
     $check = Ramo::where('nombre_ramo', $ramo)->get();
     $check = $check[0]['id'];
     $subramos = Subramo::where('ramo_id', $check)->get(['nombre_subramo']);
     if ($request->ajax()) {
         return response()->json(['subramos' => $subramos]);
     }
 }