去发现生活中的美好,记录生活中的点点滴滴

laravel配置公共函数helper

php admin 1590℃

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

喜欢 (0)

Warning: count(): Parameter must be an array or an object that implements Countable in E:\www\blog\wp-includes\class-wp-comment-query.php on line 405