Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Jul 19, 2024
1 parent 4aefce4 commit e17b3eb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"require": {
"php": ">=8.0.0",
"laket/laket-admin":"1.3.*"
"laket/laket-admin":"^1.5"
},
"autoload": {
"psr-4": {
Expand All @@ -29,8 +29,8 @@
},
"laket" : {
"title": "数据库管理",
"version": "1.2.9",
"adaptation": "1.3.*",
"version": "1.3.0",
"adaptation": "^1.5",
"require": {},
"sort": 200
},
Expand Down
17 changes: 17 additions & 0 deletions src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ class Service extends BaseService
*/
public $setting = __DIR__ . '/../resources/config/setting.php';

/**
* 包名
*/
protected $pkg = 'laket/laket-database';

/**
* 权限菜单 slug
*/
Expand All @@ -33,6 +38,18 @@ public function boot()
Flash::extend('laket/laket-database', __CLASS__);
}

/**
* 在插件安装、插件卸载等操作时有效
*/
public function action()
{
register_install_hook($this->pkg, [$this, 'install']);
register_uninstall_hook($this->pkg, [$this, 'uninstall']);
register_upgrade_hook($this->pkg, [$this, 'upgrade']);
register_enable_hook($this->pkg, [$this, 'enable']);
register_disable_hook($this->pkg, [$this, 'disable']);
}

/**
* 开始,只有启用后加载
*/
Expand Down

0 comments on commit e17b3eb

Please sign in to comment.