public function getPres() { $id = $_POST["uid"]; $pat = patient::find($id); if ($pat == null) { redirect("phar"); } $patRecs = DB::connection("centraldb")->select('select * from `MR' . $id . '` where `type` = "pres" and `flag` = "0" '); session(["patId" => $pat->uid]); return view("pharmacy.buy", compact("patRecs", "pat")); }
/** * @param $uid * @return mixed */ public static function getPatient($uid) { $pat = patient::find($uid); return $pat; }