很多教程都会说,你在 composer.json 这个文件中通过添加一个自动加载的文件,就可以实现这个需求。但我认为这不是一个好的方式,当你在 helpers.php 文件中添加了
composer.json
helpers.php