mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-19 05:07:50 +09:00
search functionality and settings fixes
This commit is contained in:
@@ -32,6 +32,8 @@ class SettingsController extends Controller
|
||||
{
|
||||
$setting = Setting::find($id);
|
||||
|
||||
if((bool)$setting->system === true) return abort(404);
|
||||
|
||||
if (!is_null($setting)) {
|
||||
return view('settings.edit')->with([
|
||||
'setting' => $setting,
|
||||
@@ -80,4 +82,21 @@ class SettingsController extends Controller
|
||||
]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function clear($id)
|
||||
{
|
||||
$setting = Setting::find($id);
|
||||
if((bool)$setting->system !== true) {
|
||||
$setting->value = '';
|
||||
$setting->save();
|
||||
}
|
||||
return redirect()->route('settings.index')->with([
|
||||
'success' => 'You have successfully edited this Setting!',
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user