app/Http/Controllers/DiagnoseController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $diagnoses = Diagnose::find($id);
        $diagnoses->name = $request->input('diagnoses');
        $diagnoses->description = $request->input('description');
        $diagnoses->user_id = Auth::user()->id;
        $diagnoses->save();
        return redirect('/preferences')->with('success','Diagnoses Updated');
    }
public function update ( Request $ request , $ id ) { $ diagnoses = Diagnose :: find ( $ id ) ; $ diagnoses -> name = $ request -> input ( 'diagnoses' ) ; $ diagnoses -> description = $ request -> input ( 'description' ) ; $ diagnoses -> user_id = Auth :: user ( ) -> id ; $ diagnoses -> save ( ) ; return redirect ( '/preferences' ) -> with ( 'success' , 'Diagnoses Updated' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .