Using laravel-health on laravel site I got error on checks:
Optimized App
Configs are not cached.
Debugging the code I found in vendor/spatie/laravel-health/src/Checks/Checks/OptimizedAppCheck.php :
if ($this->shouldPerformCheck(self::CONFIG)) {
if (! app()->configurationIsCached()) {
return $result->failed('Configs are not cached.');
}
}
In .env I set :
APP_ENV=production
APP_DEBUG=false
Looking code I found :
public function getCachedConfigPath()
{
return $this->normalizeCachePath('APP_CONFIG_CACHE', 'cache/config.php');
}
Which options have I to check not to have this error on dev/production configuration ?
"laravel/framework": "^10.48.7",
"spatie/laravel-health": "^1.28",
Thanks in advance!