public function misCitas() { $fecha = Carbon::now()->format('Y-m-d'); $id = Auth::user()->id; $consultas = Horas_agendadas::where('fecha', '>=', $fecha)->where('id_usuario', $id)->orderBy('id_horas', 'asc')->get(); return view('admin.index', compact('consultas')); }
public function pagos($id) { $consultas = Horas_agendadas::where('id_usuario', $id)->groupBy('fecha', 'id_horas')->orderBy('fecha', 'asc')->get(); $pagos = Pagos::where('user_id', $id)->orderBy('fecha', 'desc')->get(); $usuario = User::findOrFail($id); return view('admin.pagar.index', compact('usuario', 'consultas', 'pagos')); }
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 ver_horas(Request $request) { $horas = Horas_agendadas::name($request->get('name'))->groupBy('fecha', 'id_horas')->orderBy('fecha', 'desc')->paginate(8); return view('admin.citas.index', compact('horas')); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $fecha = Carbon::now()->format('Y-m-d'); $consultas = Horas_agendadas::where('fecha', '=', $fecha)->orderBy('id_horas', 'asc')->get(); return view('admin.index', compact('consultas')); }