public function getIndex()
 {
     $patients = Patient::all();
     foreach ($patients as $patient) {
         echo $patient->pat_name;
     }
     return view('testview')->with(['patients' => $patients]);
 }
 public function index()
 {
     $patients = Patient::all();
     return $patients;
 }