Esempio n. 1
0
 /**
  * Create a new patient record.
  *
  * @return JSON
  */
 public function create()
 {
     //
     $patient = new Patient();
     $patient->created_by = Auth::user()->id;
     $patient->concrete = false;
     if ($patient->save()) {
         return response()->json(["status" => "success", "patient" => $patient->toArray()]);
     } else {
         return response()->json(["status" => "failure", "message" => "Couldn't save new patient record."], 422);
     }
 }