app/Http/Controllers/DrugTypeController.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)
    {
        $type =DrugType::find($id);
        $type->name = $request->input('name');
        $type->save();
        return redirect('/drugs')
            ->with('success','Drug Type Updated');
    }
public function update ( Request $ request , $ id ) { $ type = DrugType :: find ( $ id ) ; $ type -> name = $ request -> input ( 'name' ) ; $ type -> save ( ) ; return redirect ( '/drugs' ) -> with ( 'success' , 'Drug Type Updated' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .