diff --git a/modules/system/models/PluginVersion.php b/modules/system/models/PluginVersion.php index 21045996c..460f79731 100644 --- a/modules/system/models/PluginVersion.php +++ b/modules/system/models/PluginVersion.php @@ -77,6 +77,16 @@ class PluginVersion extends Model } + /** + * Only include enabled plugins + * @param $query + * @return mixed + */ + public function scopeEnabled($query) + { + return $query->where('is_disabled', '!=', 1); + } + /** * Returns the current version for a plugin * @param string $pluginCode Plugin code. Eg: Acme.Blog