mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-21 15:36:58 +00:00
Added public build folder and support for a demo mode
This commit is contained in:
parent
0d8ca22487
commit
9a470b07fd
5 changed files with 37 additions and 5 deletions
app/Http/Controllers
|
@ -31,13 +31,16 @@ class SettingController extends Controller
|
|||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
$this->preventAccessForDemoUsers();
|
||||
$this->checkPermission('settings-update');
|
||||
|
||||
// Cycles through posted settings and update them
|
||||
foreach($request->all() as $name => $value) {
|
||||
if(strpos($name, 'setting-') !== 0) continue;
|
||||
$key = str_replace('setting-', '', trim($name));
|
||||
Setting::put($key, $value);
|
||||
}
|
||||
|
||||
session()->flash('success', 'Settings Saved');
|
||||
return redirect('/settings');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue