芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/app/Http/Controllers/AboutSettingController.php
language)) { $data['lang_id'] = 0; $data['setting'] = AboutSetting::firstOrFail(); } else { $lang = Language::where('code', $request->language)->firstOrFail(); $data['lang_id'] = $lang->id; $data['setting'] = AboutSetting::findOrFail($lang->id); } return view('settings.about.about-edit', $data, compact('langs')); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\setting $setting * @return \Illuminate\Http\Response */ public function update(Request $request, AboutSetting $setting, $langid) { $setting = AboutSetting::where('language_id', $langid)->firstOrFail(); $input = $request->all(); $setting->update($input); return back()->with('setting_success','Settings updated successfully!'); } }