/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $listado = Listado_horas::all();
     $especialista = User::where('type', 'Especialista')->get(['first_name', 'last_name', 'id']);
     $paciente = User::where('type', '!=', 'Especialista')->get(['first_name', 'last_name', 'id']);
     return view('admin.citas.cita', compact('listado', 'especialista', 'paciente'));
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $pacientes = User::where('type', '!=', 'Especialista')->get(['first_name', 'last_name', 'id']);
     $especialistas = User::where('type', 'Especialista')->get(['first_name', 'last_name', 'id']);
     $tratamientos = Tratamiento::all();
     return view('admin.diagnostico.create', compact('pacientes', 'especialistas', 'tratamientos'));
 }
Example #3
0
 public function reporteCitas(Request $request)
 {
     $fecha = $request->fecha;
     $id = $request->especialista;
     $especialista = User::where('id', $id)->first();
     $citas = Horas_agendadas::where('fecha', $fecha)->where('id_especialista', $id)->get();
     $view = View::make('pdf.reporteCitas.index', compact('invoice', 'fecha', 'citas'))->with('especialista', $especialista)->render();
     $pdf = App::make('dompdf.wrapper');
     $pdf->loadHTML($view);
     //return $pdf->download('usuarios.pdf');
     return $pdf->stream('invoice');
 }
 public function paciente(Request $request)
 {
     $id = Auth::user()->id;
     $diagnosticos = Diagnostico::especialista($request->get('especialista'))->fecha($request->get('fecha'))->Where('id_usuario', $id)->orderBy('fecha', 'asc')->paginate(8);
     $especialistas = User::where('type', 'especialista')->orderBy('first_name', 'asc')->get(['first_name', 'last_name', 'id']);
     return view('admin.diagnostico.paciente', compact('diagnosticos', 'especialistas'));
 }
 public function index(Request $request)
 {
     $id = Auth::user()->id;
     $user = User::where('id', $id)->get();
     return view('admin.users.perfil', compact('user'));
 }
Example #6
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $pagos = Pagos::findOrFail($id);
     $pacientes = User::where('type', '!=', 'Especialista')->orderBy('first_name', 'asc')->get(['first_name', 'last_name', 'id']);
     return view('admin.pagos.edit', compact('pagos', 'pacientes'));
 }
Example #7
0
 public function editar_cita()
 {
     $listado = Hora::orderBy('hora', 'asc')->get();
     $especialista = User::where('type', 'Especialista')->get(['first_name', 'last_name', 'id']);
     $paciente = User::where('type', '!=', 'Especialista')->get(['first_name', 'last_name', 'id']);
     $disponibles = Hora::orderBy('hora', 'asc')->get();
     return view('admin.citas.edit', compact('listado', 'especialista', 'paciente', 'disponibles'));
 }
Example #8
0
 public function getData()
 {
     $users = User::where('saldo', '>', 0)->orderBy('first_name', 'ASC')->paginate(100000);
     return $users;
 }