mirror of
https://github.com/flarum/core.git
synced 2025-10-15 00:44:40 +02:00
Add ability to uninstall an extension
This commit is contained in:
@@ -35,4 +35,9 @@ class DatabaseSettingsRepository implements SettingsRepository
|
||||
|
||||
$query->$method(compact('key', 'value'));
|
||||
}
|
||||
|
||||
public function delete($key)
|
||||
{
|
||||
$this->database->table('config')->where('key', $key)->delete();
|
||||
}
|
||||
}
|
||||
|
@@ -42,4 +42,11 @@ class MemoryCacheSettingsRepository implements SettingsRepository
|
||||
|
||||
$this->inner->set($key, $value);
|
||||
}
|
||||
|
||||
public function delete($key)
|
||||
{
|
||||
unset($this->cache[$key]);
|
||||
|
||||
$this->inner->delete($key);
|
||||
}
|
||||
}
|
||||
|
@@ -9,4 +9,6 @@ interface SettingsRepository
|
||||
public function get($key, $default = null);
|
||||
|
||||
public function set($key, $value);
|
||||
|
||||
public function delete($key);
|
||||
}
|
||||
|
Reference in New Issue
Block a user