0
0
Fork 0
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:
Dan Brown 2015-12-31 17:57:34 +00:00
parent 0d8ca22487
commit 9a470b07fd
5 changed files with 37 additions and 5 deletions
app/Http/Controllers

View file

@ -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');
}