Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for * ( ANY ) media collection #3286

Merged
merged 3 commits into from
Jun 22, 2023

Conversation

huzaifaarain
Copy link
Contributor

There should be an option to fetch all associated media records regardless of the collection they are associated with.

We can pass the asterisk or "star" symbol (*) to function for loading all media that belongs to the caller model.

$model->getMedia('*')

There should be an option to fetch all associated media records regardless of the collection they are associated with.

We can pass the asterisk or "star" symbol (*)  to function for loading all media that belongs to the caller model.
 
`$model->getMedia('*')`
@freekmurze
Copy link
Member

Could you add tests for this and mention this in the documentation?

@huzaifaarain
Copy link
Contributor Author

Could you add tests for this and mention this in the documentation?

Sure.

@huzaifaarain
Copy link
Contributor Author

Could you add tests for this and mention this in the documentation?

Hi @freekmurze

Please review the PR, I have added the docs and the test.

@freekmurze freekmurze merged commit bc80215 into spatie:main Jun 22, 2023
@freekmurze
Copy link
Member

Thanks!

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.

2 participants