PHPackages                             rmiswt/think-addons - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rmiswt/think-addons

ActiveLibrary

rmiswt/think-addons
===================

The ThinkPHP6 Addons Package

1.06(3y ago)020Apache-2.0PHPPHP &gt;=7.1.0

Since Oct 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/rmiswt/think-addons)[ Packagist](https://packagist.org/packages/rmiswt/think-addons)[ RSS](/packages/rmiswt-think-addons/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

think-addons
============

[](#think-addons)

The ThinkPHP 6 Addons Package

安装
--

[](#安装)

> composer require rmiswt/think-addons

配置
--

[](#配置)

### 生成配置

[](#生成配置)

系统安装后会自动在 config 目录中生成 addons.php 的配置文件， 如果系统未生成可在命令行执行

```
php think addons:config
```

快速生成配置文件

### 公共配置

[](#公共配置)

```
'addons' => [
    // 是否自动读取取插件钩子配置信息（默认是开启）
    'autoload' => true,
    // 当关闭自动获取配置时需要手动配置hooks信息
    'hooks' => [
	    // 可以定义多个钩子
        'testhook'=>'test' // 键为钩子名称，用于在业务中自定义钩子处理，值为实现该钩子的插件，
					// 多个插件可以用数组也可以用逗号分割
	],
    'route' => [],
    'service' => [],
];
```

或者在\\config目录中新建`addons.php`,内容为：

```
