Support the ongoing development of Laravel.io →
Configuration Cache Laravel.io

Dear folks,

Ref:Laravel5

I am looking for a way to clear the configuration cache programmatically. So far the I am using the following command

php artisan config:cache

in command line, but its not easy while we deploying application in production server.

But in my production server php shell commands are not allowed through script such as

$command = 'php artisan config:cache'; exec($command);

Please suggest a way to clear cache from with in a code file programmatically.

Regards, Najeem

Last updated 3 years ago.
0
$exitCode = Artisan::call('config:cache');
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.