Skip to content

Commit 24f0f28

Browse files
authored
feat: added detailed about for cache failover driver (#57579)
* feat: added detailed about for cache failover driver * remove whitespace
1 parent 47de756 commit 24f0f28

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/Illuminate/Foundation/Console/AboutCommand.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,21 @@ protected function gatherApplicationInformation()
188188

189189
static::addToSection('Drivers', fn () => array_filter([
190190
'Broadcasting' => config('broadcasting.default'),
191-
'Cache' => config('cache.default'),
191+
'Cache' => function ($json) {
192+
$cacheStore = config('cache.default');
193+
194+
if (config('cache.stores.'.$cacheStore.'.driver') === 'failover') {
195+
$secondary = new Collection(config('cache.stores.'.$cacheStore.'.stores'));
196+
197+
return value(static::format(
198+
value: $cacheStore,
199+
console: fn ($value) => '<fg=yellow;options=bold>'.$value.'</> <fg=gray;options=bold>/</> '.$secondary->implode(', '),
200+
json: fn () => $secondary->all(),
201+
), $json);
202+
}
203+
204+
return $cacheStore;
205+
},
192206
'Database' => config('database.default'),
193207
'Logs' => function ($json) {
194208
$logChannel = config('logging.default');

0 commit comments

Comments
 (0)