芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/bck/app/Http/Controllers/Admin/CookieController.php
all(),[ 'status' => 'required|numeric', 'link' => 'required|string', 'desc' => 'required|string|max:50000', ]); $validated = $validator->validate(); $type = 'site_cookie'; $status = [ '0' => false, '1' => true, ]; $validated['status'] = $status[$validated['status']]; // Insert bata into batabase try{ SiteSections::updateOrCreate(['key' => $type],['key' => $type , 'value' => $validated, 'status' => $validated['status']]); }catch(Exception $e) { return back()->with(['error' => ['Something went worng! Please try again.']]); } return back()->with(['success' => ['Cookie information updated successfully!']]); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }