app/Http/Controllers/DiagnoseController.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)
    {
        $diagnoses = new Diagnose();
        $diagnoses->name = $request->input('diagnoses');
        $diagnoses->description = $request->input('description');
        $diagnoses->user_id = Auth::user()->id;
        $diagnoses->save();
        return redirect('/preferences')->with('success','New Diagnoses Added');
    }
public function store ( Request $ request ) { $ diagnoses = new Diagnose ( ) ; $ diagnoses -> name = $ request -> input ( 'diagnoses' ) ; $ diagnoses -> description = $ request -> input ( 'description' ) ; $ diagnoses -> user_id = Auth :: user ( ) -> id ; $ diagnoses -> save ( ) ; return redirect ( '/preferences' ) -> with ( 'success' , 'New Diagnoses Added' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .