afbora / kirby-loader
为 Kirby 从多个根目录加载插件
2.2.0
2024-03-16 12:53 UTC
Requires
- php: ^7.4|^8.0
- getkirby/composer-installer: ^1.2
README
Kirby Loader 允许您从多个根目录安装插件。您可以通过分组轻松管理插件。
安装
使用 composer 安装
composer require afbora/kirby-loader
作为 git 子模块添加
git submodule add https://github.com/afbora/kirby-loader.git site/plugins/kirby-loader
用法
<?php return [ 'afbora.loader.roots' => [ // register string paths '/plugins/core', '/plugins/payment', '/plugins/shipping', // register single directory '/theme', // register with callback function () { return option('custom.option.path'); }, ] ];
选项
该包的默认值是
所有值都可以在 config.php
文件中更新。