<?php

namespace App\Http\Controllers\EndoBOOK;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Imports\bookimport;
use Maatwebsite\Excel\Facades\Excel;

use App\Models\Department;
use App\Models\User;
use Carbon\Carbon;

use Illuminate\Support\Facades\DB;

class EmergencyController extends Controller
{

    public function index()
    {
        return view('test');
    }

    public function store(Request $r){

    }


    public function show($id)
    {
        $view['mmmm']       = "mmmm";
        $view['physician']  = User::where("user_type","doctor")->get();
        $view['procedure']  = DB::table('tb_procedure')->where("procedure_code","like","gi%")->get();
        $view['tb_bookset_calendar_department'] = DB::table('tb_bookset_calendar_department')
        ->where("calendar_date",">", Carbon::now()->addDay(15))
        ->orderBy("calendar_date")
        ->get();
        return view("EndoBOOK.booking.show",$view);
    }



}
