From abb0456641f12a2cea458bb3e4477d1beb9ef53e Mon Sep 17 00:00:00 2001 From: Craig Crosby Date: Sat, 1 Dec 2018 15:00:18 -0500 Subject: Add remove() to Settings Model --- app/Model/SettingModel.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/Model/SettingModel.php') diff --git a/app/Model/SettingModel.php b/app/Model/SettingModel.php index 5b2ee54f..e3cd4f96 100644 --- a/app/Model/SettingModel.php +++ b/app/Model/SettingModel.php @@ -110,4 +110,18 @@ abstract class SettingModel extends Base return ! in_array(false, $results, true); } + + /** + * Remove a setting + * + * @access public + * @param string $option + * @return bool + */ + public function remove($option) + { + return $this->db->table(self::TABLE) + ->eq('option', $option) + ->remove(); + } } -- cgit v1.2.3