有的时候修改.env文件,在env('TEST')使用时不起作用。 可以去除缓存 php artisan config:clear 测试: php artisan tinker >>env('TEST')