Skip to content
New issue

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

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

Already on GitHub? # to your account

Revert "Support for collections & MorphOne polymorphic pivot table" #529

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

awcodes
Copy link
Owner

@awcodes awcodes commented Aug 19, 2024

Reverts #523

get_class() breaks if $ids is an array of integers instead of array of media items. Line 25 in helpers.php

if (is_array($ids) && is_related_to_media_through_pivot(get_class(current($ids)), Media::class)) {
    $mediaIds = collect($ids)->map(fn ($model) => $model?->media_id)->toArray();

    return Media::whereIn('id', $mediaIds)->get();
}

@awcodes awcodes merged commit 24378a6 into 3.x Aug 19, 2024
4 checks passed
GeorgeFourkas added a commit to GeorgeFourkas/filament-curator that referenced this pull request Aug 30, 2024
GeorgeFourkas added a commit to GeorgeFourkas/filament-curator that referenced this pull request Aug 30, 2024
GeorgeFourkas added a commit to GeorgeFourkas/filament-curator that referenced this pull request Aug 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant