1
0
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:
Toby Zerner
2015-08-14 12:48:29 +09:30
parent 2edcbacccc
commit 014bacb7ab
6 changed files with 72 additions and 6 deletions

View File

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

View File

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

View File

@@ -9,4 +9,6 @@ interface SettingsRepository
public function get($key, $default = null);
public function set($key, $value);
public function delete($key);
}