app/Http/Controllers/api/MeaController.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)
    {
       $all = $request->all();
        $id = $all['id'];
        $res = ApitestModel::where('id',$id)->update($all);
        return json_encode([
            'ret'=>200,
            'msg'=>"修改成功",
        ]);
    }
public function update ( Request $ request , $ id ) { $ all = $ request -> all ( ) ; $ id = $ all [ 'id' ] ; $ res = ApitestModel :: where ( 'id' , $ id ) -> update ( $ all ) ; return json_encode ( [ 'ret' => 200 , 'msg' => " 修改成功", ] ) ; }
Update the specified resource in storage.
Update the specified resource in storage .
// dd($all);