解决后台插件更新后无法正常使用的bug
This commit is contained in:
@@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
namespace app\model;
|
namespace app\model;
|
||||||
|
|
||||||
|
use app\facade\Cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扩展模型
|
* 扩展模型
|
||||||
*/
|
*/
|
||||||
@@ -22,6 +24,14 @@ class Addons extends \think\Model {
|
|||||||
'config' => 'json'
|
'config' => 'json'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public static function onAfterWrite($addons){
|
||||||
|
Cache::delete('sentcms_hooks');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function onAfterDelete($addons){
|
||||||
|
Cache::delete('sentcms_hooks');
|
||||||
|
}
|
||||||
|
|
||||||
protected function setStatusAttr($value) {
|
protected function setStatusAttr($value) {
|
||||||
return $value ? $value : 0;
|
return $value ? $value : 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user