From 765ba2367c97d5c371d6ed10e031c6bd387403be Mon Sep 17 00:00:00 2001 From: Daniel Sepp <43651556+bloomlive@users.noreply.github.com> Date: Thu, 1 Dec 2022 17:52:43 +0200 Subject: [PATCH 1/3] [9.x] Replace searched value with correct FQCN --- src/Illuminate/Foundation/Console/ShowModelCommand.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Illuminate/Foundation/Console/ShowModelCommand.php b/src/Illuminate/Foundation/Console/ShowModelCommand.php index e7d2a9bde52b..c3918b2b78a4 100644 --- a/src/Illuminate/Foundation/Console/ShowModelCommand.php +++ b/src/Illuminate/Foundation/Console/ShowModelCommand.php @@ -89,6 +89,7 @@ public function handle() try { $model = $this->laravel->make($class); + $class = ($class === get_class($model)) ? $class : get_class($model) . " (searched: {$this->argument('model')})"; } catch (BindingResolutionException $e) { return $this->components->error($e->getMessage()); } From 6ad91a37fe76f9ea4fc44f72a49c17099af89065 Mon Sep 17 00:00:00 2001 From: Daniel Sepp <43651556+bloomlive@users.noreply.github.com> Date: Thu, 1 Dec 2022 18:05:57 +0200 Subject: [PATCH 2/3] Formatting --- src/Illuminate/Foundation/Console/ShowModelCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Console/ShowModelCommand.php b/src/Illuminate/Foundation/Console/ShowModelCommand.php index c3918b2b78a4..29e975f02ecf 100644 --- a/src/Illuminate/Foundation/Console/ShowModelCommand.php +++ b/src/Illuminate/Foundation/Console/ShowModelCommand.php @@ -89,7 +89,7 @@ public function handle() try { $model = $this->laravel->make($class); - $class = ($class === get_class($model)) ? $class : get_class($model) . " (searched: {$this->argument('model')})"; + $class = ($class === get_class($model)) ? $class : get_class($model)." (searched: {$this->argument('model')})"; } catch (BindingResolutionException $e) { return $this->components->error($e->getMessage()); } From e3c339c5a80212b820207bfa4682325d54492818 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 1 Dec 2022 12:48:01 -0600 Subject: [PATCH 3/3] Update ShowModelCommand.php --- src/Illuminate/Foundation/Console/ShowModelCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Console/ShowModelCommand.php b/src/Illuminate/Foundation/Console/ShowModelCommand.php index 29e975f02ecf..634053cdef4f 100644 --- a/src/Illuminate/Foundation/Console/ShowModelCommand.php +++ b/src/Illuminate/Foundation/Console/ShowModelCommand.php @@ -89,7 +89,8 @@ public function handle() try { $model = $this->laravel->make($class); - $class = ($class === get_class($model)) ? $class : get_class($model)." (searched: {$this->argument('model')})"; + + $class = get_class($model); } catch (BindingResolutionException $e) { return $this->components->error($e->getMessage()); }