except(['_token','_method']); if (empty($data)){ return back()->withErrors(['status'=>'无数据更新']); } Site::truncate(); foreach ($data as $key=>$val){ Site::create([ 'key' => $key, 'value' => $val ]); } return back()->with(['status'=>'更新成功']); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }