diff --git a/src/Illuminate/Foundation/Console/ShowModelCommand.php b/src/Illuminate/Foundation/Console/ShowModelCommand.php index a1c9e3ec9938..df77d02da920 100644 --- a/src/Illuminate/Foundation/Console/ShowModelCommand.php +++ b/src/Illuminate/Foundation/Console/ShowModelCommand.php @@ -18,6 +18,7 @@ use Symfony\Component\Process\Exception\ProcessSignaledException; use Symfony\Component\Process\Exception\RuntimeException; use Symfony\Component\Process\Process; +use UnitEnum; #[AsCommand(name: 'model:show')] class ShowModelCommand extends Command @@ -329,7 +330,7 @@ protected function displayCli($class, $database, $table, $attributes, $relations if ($attribute['default'] !== null) { $this->components->bulletList( - [sprintf('default: %s', $attribute['default'])], + [sprintf('default: %s', $attribute['default'] instanceof UnitEnum ? $attribute['default']->name : $attribute['default'])], OutputInterface::VERBOSITY_VERBOSE ); }