We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I suppose this is a small bug as in InteractsWithMedia::class the function:
public function getFirstMedia(string $collectionName = 'default', array $filters = []): ?Media { $media = $this->getMedia($collectionName, $filters); return $media->first(); }
enforce $filters type to array while InteractsWithMedia::getMedia() supports $filters as callable too.
$filters
array
InteractsWithMedia::getMedia()
Have a great day.
The text was updated successfully, but these errors were encountered:
I'd accept a PR with tests that fixes this.
Sorry, something went wrong.
Add callable filter support to getFirstMedia() spatie#1779
8be5c87
Add callable filter support to getFirstMedia() #1779 (#1781)
b4652cf
Fixed by #1781.
No branches or pull requests
Hi,
I suppose this is a small bug as in InteractsWithMedia::class the function:
enforce
$filters
type toarray
whileInteractsWithMedia::getMedia()
supports$filters
as callable too.Have a great day.
The text was updated successfully, but these errors were encountered: