© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
javalava6985

Costumize AttachAction

I have a relation manager in a Laravel Filament V3 app. It manages the relation between my Project model and my Attendee model. They are connected through a pivot table and a BelongsToMany relationship.

When i add the AttachAction in the header i want to be able to search my projects by name but the name is not on the Project model itself. The name is set on a Course model which is connected trough a HasMany / BelongsTo relationship.

public function table(Table $table): Table
    {
        return $table
            ->recordTitleAttribute('id')
            ->columns([
                TextColumn::make('course.title')
                    ->label('Cursus')
                    ->sortable(),
                TextColumn::make('start_datetime')
                    ->label('Datum')
                    ->date('d-m-Y')
                    ->sortable()
            ])
            ->headerActions([
                Tables\Actions\AttachAction::make()
                    ->recordSelectSearchColumns(['start_datetime', 'course.title']),
            ])
            ->actions([
                Tables\Actions\EditAction::make()->slideOver(),
                Tables\Actions\DeleteAction::make(),
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\DeleteBulkAction::make(),
                ]),
            ]);
    }
}
public function table(Table $table): Table
    {
        return $table
            ->recordTitleAttribute('id')
            ->columns([
                TextColumn::make('course.title')
                    ->label('Cursus')
                    ->sortable(),
                TextColumn::make('start_datetime')
                    ->label('Datum')
                    ->date('d-m-Y')
                    ->sortable()
            ])
            ->headerActions([
                Tables\Actions\AttachAction::make()
                    ->recordSelectSearchColumns(['start_datetime', 'course.title']),
            ])
            ->actions([
                Tables\Actions\EditAction::make()->slideOver(),
                Tables\Actions\DeleteAction::make(),
            ])
            ->bulkActions([
                Tables\Actions\BulkActionGroup::make([
                    Tables\Actions\DeleteBulkAction::make(),
                ]),
            ]);
    }
}


I've tried to do this. The TextColumn gives the title of the course but the AttachAction does not work: Unknown column 'course.title' in 'where clause'
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

AttachAction title
FilamentFFilament / ❓┊help
3y ago
Custom AttachAction
FilamentFFilament / ❓┊help
3y ago
AttachAction::make()
FilamentFFilament / ❓┊help
3y ago
AttachAction - MutateBeforeSave?
FilamentFFilament / ❓┊help
3y ago