本文介绍了Lumen PHP Artisan config:找不到缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试用PHP micro Framework Lumen(来自laravel).当我设置流明并尝试像在Laravel中一样使用php artisan config:cache命令时,出现此错误:

I'm trying out the PHP micro Framework Lumen (from laravel).When I set up Lumen and I try to use the php artisan config:cache command like in Laravel, I get this error :

因此,当我尝试将文件部署到服务器时遇到问题,因此必须更改.env文件以更改数据库用户名和密码.

So I have problem when I try to deploy the files to server, so I have to change .env file to change the database username and password.

这使我认为config在工匠中不可用

This makes me think config is not available in artisan

如何将其添加到工匠手中?

How can I add it to artisan ?

推荐答案

是的,您不能在Lumen项目中使用php artisan config:cache,因为它不是开箱即用的.

Yes, you can not use the php artisan config:cache with your Lumen project, because it is not available out of the box.

您可以通过添加此程序包(orumad/lumen-config-cache)来添加它到您的项目:

You can add it by adding this package (orumad/lumen-config-cache) to your project:

composer require orumad/lumen-config-cache

这篇关于Lumen PHP Artisan config:找不到缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 12:28
查看更多