怎么把fun-addons 组件helper auth.移出来作为单独的扩展,防止更新导致的错误

动态 未结 置顶 精帖 0 2929
admin
VIP1 2023-03-24 05:18:28
悬赏:0F币
第一步、在extend 目录下建立 fun 目录 第二步、把fun-addons 下src下文件复制到extend 目录下 img[https://funcdn.funadmin.com/storage/uploads/20220503/87eb54827fdcf1b3fd4ec5261160fa58.jpg] 第三步、根目录下的 composer.json 内加入下面的数据 配置如下 [pre] { "name": "funadmin/funadmin", "description": "FunAdmin是一个基于thinkphp6,layui,requirejs的敏捷开发应用框架", "type": "project", "license": "Apache-2.0", "keywords": [ "FunAdmin","CMS", "CMF","Layui", "easywechat", "framework","TP6", "thinkphp", "thinkphp6","ORM" ], "homepage": "https://www.funadmin.com", "authors": [ { "name": "funadmin", "email": "994927909@qq.com" } ], "require": { "php": ">=7.4.0", "ext-json": "*", "topthink/framework": "^6.0.12", "topthink/think-orm": "2.0.*", "topthink/think-view": "^1.0", "topthink/think-image": "^1.0", "topthink/think-queue": "^3.0", "topthink/think-captcha": "^3.0", "topthink/think-helper": "^3.1", "topthink/think-multi-app": "^1.0", "topthink/think-ide-helper": "^1.0", "topthink/think-throttle": "^1.3", "doctrine/annotations": "^1.13", "ramsey/uuid": "^4.2", "firebase/php-jwt":"^6.0.0" }, "require-dev": { "symfony/var-dumper": "^4.4" }, "autoload": { "psr-4": { "app\\": "app" }, "psr-0": { "": "extend/" }, "files": [ "extend/fun/helper.php", "extend/fun/form.php" ] }, "extra": { "think": { "services": [ "fun\\addons\\Service" ], "config": { "addons": "src/config.php", "api": "src/api.php", "console": "src/console.php" } } }, "config": { "preferred-install": "dist" }, "scripts": { "post-autoload-dump": [ "@php think service:discover", "@php think vendor:publish" ] } } [/pre] 第四步 在app/service.php 中加入下列 没有则新建文件 [pre] <?php use app\AppService; // 系统服务定义文件 // 服务在完成全局初始化之后执行 return [ AppService::class, \fun\addons\Service::class, ]; [/pre]
回帖
本周热议