app/Http/Controllers/VitalsController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $vital = new Vital();
        $vital->patient_id = $request->input('patient_id');
        $vital->blood_pressure = $request->input('systolic')."/".$request->input('diastolic');
        $vital->weight = $request->input('weight');
        $vital->temperature = $request->input('temperature');
        $vital->pulse = $request->input('pulse');
        $vital->RDT = $request->input('rdt');
        $vital->glucose = $request->input('glucose');
        $vital->type = "Consultation";
        $vital->user_id= Auth::user()->id;
        $vital->save();
        $registration = Registration::find($request->input('registration_id'));
        $registration->vitals = 1;
        $registration->save();
        toastr()->success('Vitals Added Successfully');
        return redirect()->route('vitals.index');
    }
public function store ( Request $ request ) { $ vital = new Vital ( ) ; $ vital -> patient_id = $ request -> input ( 'patient_id' ) ; $ vital -> blood_pressure = $ request -> input ( 'systolic' ) . " / " . $ request -> input ( 'diastolic' ) ; $ vital -> weight = $ request -> input ( 'weight' ) ; $ vital -> temperature = $ request -> input ( 'temperature' ) ; $ vital -> pulse = $ request -> input ( 'pulse' ) ; $ vital -> RDT = $ request -> input ( 'rdt' ) ; $ vital -> glucose = $ request -> input ( 'glucose' ) ; $ vital -> type = " Consultation " ; $ vital -> user_id = Auth :: user ( ) -> id ; $ vital -> save ( ) ; $ registration = Registration :: find ( $ request -> input ( 'registration_id' ) ) ; $ registration -> vitals = 1 ; $ registration -> save ( ) ; toastr ( ) -> success ( 'Vitals Added Successfully' ) ; return redirect ( ) -> route ( 'vitals.index' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .