/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { foreach ($request->all() as $req => $value) { \DB::table('footer')->where('judul', $req)->update(['post' => $value]); } Footer::create($request->all()); Session::flash('message', 'Data Telah Tersimpan'); return Redirect::to('/footer'); }