app/Http/Controllers/ProductController.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, ProductModel $productM, $id)
    {
        $input = $request->all();
        $model = $productM->find($id);
        $model->fill($input);
        if($model->save())
            return $this->returnData(['respCode'=>'000']);
        else
            return $this->returnData(['respCode'=>'457']);
    }
public function update ( Request $ request , ProductModel $ productM , $ id ) { $ input = $ request -> all ( ) ; $ model = $ productM -> find ( $ id ) ; $ model -> fill ( $ input ) ; if ( $ model -> save ( ) ) return $ this -> returnData ( [ 'respCode' => '000' ] ) ; else return $ this -> returnData ( [ 'respCode' => '457' ] ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
//