Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 laravel 5 中将主文件夹 [app] 更改为作者姓名,我该怎么做才能做到这一点,而无需更改 autoloader 或 composer 中的任何内容?
您将在 composer.json 文件中有一个名为“psr-4”的条目,将其更改为新的重命名目录。
"autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "your_new_directory/" } },
然后在命令行运行:
$ composer dump-autoload
或者
$ php composer.phar dump-autoload