© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
nowak

Form Select Relationship error - array_diff(): Argument #2 must be of type array, int given

I am receiving this error from a quite complex ProductResource, which I have attached as a file.

And here is the flare share link:
https://flareapp.io/share/NPLxGQrP

I get this error when I try to create a Product record, filling out the form goes smoothly, but then when clicking the submit button, I get this error.

It seems to be related to a select field with a relationship, but I have a few of those, and I don't know exactly what to look for to debug this.

Does anyone have any idea of how I can proceed with this?
ProductResource.php32.06KB
Flare
array_diff(): Argument #2 must be of type array, int given - The error occurred at https://meinrad_laravel.test/admin/products/create
Solution
It turned out that a filament update fixed it 😮‍💨
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Argument #2 ($label) must be of type string, array given
FilamentFFilament / ❓┊help
3y ago
foreach() argument must be of type array|object, null given
FilamentFFilament / ❓┊help
2y ago
Argument #1 ($values) must be of type array, string given
FilamentFFilament / ❓┊help
3y ago
Select::isOptionDisabled(): Argument #2 ($label) must be of type string, null given,
FilamentFFilament / ❓┊help
3y ago