© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
whimsical_pomelo_17483

attach form

Hi

I'd like to customize the attach select that is shown when i attach a resource to a course.

The model to attach to has a relation to a related table (like a category of the resource).

Table **COURSE**
...

Table **COURSE_RESOURCE**
course_id
resource_id

Table **RESOURCE**
resource_name
resource_type_id
....

Table **RESOURCE_TYPE**
resource_type
Table **COURSE**
...

Table **COURSE_RESOURCE**
course_id
resource_id

Table **RESOURCE**
resource_name
resource_type_id
....

Table **RESOURCE_TYPE**
resource_type


When attaching a resource to a course with the relationManager, i'd like to be able to use the select to filter on both the resource_name AND the resource_type.

I try this (where resourceType is the eloquent model relation belongsTo between the 2 tables resource && resource_type)

AttachAction::make()
    ->recordSelectSearchColumns(['resource_name', 'resourceType.resource_type'])
AttachAction::make()
    ->recordSelectSearchColumns(['resource_name', 'resourceType.resource_type'])

but i doesn't work, it does not make the join in the query.

An other way would be to present a full table of the model to attach to instead of just the select.

Is there a way to setup the attach form to show a full table of resource (with related resource_type column) with filter so that you can select any row to attach to (after eventualy filtering) ?

Any idea ?
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

Attach form
FilamentFFilament / ❓┊help
3y ago
Form Attach action?
FilamentFFilament / ❓┊help
2y ago
Attach Option Form...?
FilamentFFilament / ❓┊help
3y ago
format options on relationship manager select in attach form
FilamentFFilament / ❓┊help
3y ago