© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago
Charles

use morphOne with select

hey there, i want to use a select with my morphOne relationship.

YouthDepartments and Families are different Models and both have ExternalContacts. For the YouthDepartment, this ExternalContact is the economicManager.

    
public function contactable()
    {
        return $this->morphTo();
}
    
public function contactable()
    {
        return $this->morphTo();
}


public function economicManager() {
        $this->morphOne(ExternalContact::class, 'contactable');
}

public function economicManager() {
        $this->morphOne(ExternalContact::class, 'contactable');
}


I want to display a select with createOption in the YouthDepartments form, but i am stuck on how to implement this. According to the Filament Docs, Select is not compatible with MorphOne
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Use attribute from `MorphOne` relationship in a SelectFilter
FilamentFFilament / ❓┊help
3y ago
FileUpload Image with morphOne relationship
FilamentFFilament / ❓┊help
3y ago
Select::selectablePlaceholder(false) not working with relationships
FilamentFFilament / ❓┊help
2y ago
Select->multiple() in SelectColumn?
FilamentFFilament / ❓┊help
12mo ago