Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lumen php artisan config:cache not found

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 :

[InvalidArgumentException]
There are no commands defined in the "config" namespace.

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.

This makes me think config is not available in artisan

How can I add it to artisan ?

like image 892
Ahmed Bermawy Avatar asked Jan 03 '16 18:01

Ahmed Bermawy


People also ask

What is Artisan config cache PHP?

php artisan config:cache This command clears the cached config file as mentioned above and recaches the latest configurations into a single file again.

How do you use lumen cache?

Redis Support Before using a Redis cache with Lumen, you will need to install the illuminate/redis package via Composer. Then, you should register the Illuminate\Redis\RedisServiceProvider in your bootstrap/app.


1 Answers

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

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

composer require orumad/lumen-config-cache
like image 111
Elisha Senoo Avatar answered Sep 24 '22 07:09

Elisha Senoo