php artisan命令笔记

php artisan make:controller UserController #创建controller
php artisan make:model Flight #创建model
php artisan route:list #路由列表

php artisan config:clear #清楚配置缓存

php artisan config:cache

 

 例如在app下建一个Common文件夹 在Common下建一个function.php 放入公共函数

在项目目录下composer.json中加入

"autoload": {

"files":[

"app/Common/function.php"

]

}

在项目目录下执行

composer dump-autoload

原文地址:https://www.cnblogs.com/as3lib/p/14432208.html