Lumen/laravel添加全局自定义函数 发表于 2018-10-04 创建自定义文件 在任意文件夹下新建一个 functions.php 文件 如:”app/Common/Functions/functions.php” 配置自动加载 在 composer.json 文件中添加配置1234567{ "autoload": { "files": [ "app/Common/Functions/functions.php" ] }} 重新加载配置 运行命令:$ composer dump-auto