1、在项目APP目录下新建Helper文件,再新建一个helper.php文件作为公共函数存储的文件。
2、在composer.json添加
"autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" }, "files": [ "app/Helper/helpers.php" ] },
3、执行
composer dump-auto
转载请注明:永盟博客 » laravel配置公共函数helper
1、在项目APP目录下新建Helper文件,再新建一个helper.php文件作为公共函数存储的文件。
2、在composer.json添加
"autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" }, "files": [ "app/Helper/helpers.php" ] },
3、执行
composer dump-auto
转载请注明:永盟博客 » laravel配置公共函数helper