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