1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 18:26:07 +02:00

Finish admin permissions page and clean up everything

This commit is contained in:
Toby Zerner
2015-07-31 20:16:47 +09:30
parent 5706c71c86
commit fde7afd3e2
33 changed files with 766 additions and 291 deletions

View File

@@ -29,6 +29,10 @@ class DatabaseSettingsRepository implements SettingsRepository
public function set($key, $value)
{
$this->database->table('config')->where('key', $key)->update(['value' => $value]);
$query = $this->database->table('config')->where('key', $key);
$method = $query->exists() ? 'update' : 'insert';
$query->$method(compact('key', 'value'));
}
}