Skip to content

[10.x] Make inherited relations and virtual attributes appear in model:show command - #48800

Merged
taylorotwell merged 1 commit into
laravel:10.xfrom
sebj54:10.x
Oct 24, 2023
Merged

[10.x] Make inherited relations and virtual attributes appear in model:show command#48800
taylorotwell merged 1 commit into
laravel:10.xfrom
sebj54:10.x

Conversation

@sebj54

@sebj54 sebj54 commented Oct 23, 2023

Copy link
Copy Markdown
Contributor

Closes #48798

I did not find any existing test related to this feature. Feel free to tell me if I missed anything, because it's my first PR to the framework

@driesvints driesvints changed the title Make inherited relations and virtual attributes appear in model:show command [10.x] Make inherited relations and virtual attributes appear in model:show command Oct 23, 2023
@driesvints
driesvints requested a review from jessarcher October 23, 2023 14:39

@jessarcher jessarcher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sebj54!

I've tested it locally, and it works great!

Performance is part of why we want to ignore methods on the Model class, but it's mostly because there are methods on the Model class that call other relationship methods (e.g. morphedByMany calls morphToMany), which would trigger a false positive.

@taylorotwell
taylorotwell merged commit b52de33 into laravel:10.x Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Artisan's model:show command does not list inherited relations

3 participants