Skip to content

Commit

Permalink
Support models in unconventional locations
Browse files Browse the repository at this point in the history
Co-authored-by: Enzo Innocenzi <[email protected]>
  • Loading branch information
jessarcher and innocenzi committed Jul 13, 2022
1 parent db70724 commit 9fe42ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Foundation/Console/ShowModelCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ protected function attributeIsHidden($attribute, $model)
*/
protected function qualifyModel(string $model)
{
if (class_exists($model)) {
return $model;
}

$model = ltrim($model, '\\/');

$model = str_replace('/', '\\', $model);
Expand Down

0 comments on commit 9fe42ab

Please sign in to comment.