Skip to content

Commit 29c2279

Browse files
fix: show config when value false or null (#47987)
1 parent 6a175f3 commit 29c2279

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Illuminate/Foundation/Console/ConfigShowCommand.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ public function handle()
3232
{
3333
$config = $this->argument('config');
3434

35-
$data = config($config);
36-
37-
if (! $data) {
35+
if (! config()->has($config)) {
3836
$this->components->error("Configuration file `{$config}` does not exist.");
3937

4038
return Command::FAILURE;
4139
}
4240

4341
$this->newLine();
44-
$this->render($config, $data);
42+
$this->render($config);
4543
$this->newLine();
4644

4745
return Command::SUCCESS;
@@ -51,11 +49,12 @@ public function handle()
5149
* Render the configuration values.
5250
*
5351
* @param string $name
54-
* @param mixed $data
5552
* @return void
5653
*/
57-
public function render($name, $data)
54+
public function render($name)
5855
{
56+
$data = config($name);
57+
5958
if (! is_array($data)) {
6059
$this->title($name, $this->formatValue($data));
6160

0 commit comments

Comments
 (0)