© 2026 Hedgehog Software, LLC

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

Access record from text input column in table

public static function table(Table $table): Table
    {
        return $table
            ->striped()
            ->columns([
                Tables\Columns\TextInputColumn::make('name')
                    ->rules(['required', 'min:1', 'max:255',
                            function (string $attribute, $value, Closure $fail) {
                            
                            $itemManagerAction = app(ItemManagerAction::class);
                            
                            $name = "todo";
                            $itemCollectionId = 1;

                            if (!$itemManagerAction->verifyItemIsNotDuplicate($name, $itemCollectionId, $value)) {
                                $fail(__('name_already_used_attribute', ['name' => $value]));
                            }
                        },
                    ])
                   ...
  }
public static function table(Table $table): Table
    {
        return $table
            ->striped()
            ->columns([
                Tables\Columns\TextInputColumn::make('name')
                    ->rules(['required', 'min:1', 'max:255',
                            function (string $attribute, $value, Closure $fail) {
                            
                            $itemManagerAction = app(ItemManagerAction::class);
                            
                            $name = "todo";
                            $itemCollectionId = 1;

                            if (!$itemManagerAction->verifyItemIsNotDuplicate($name, $itemCollectionId, $value)) {
                                $fail(__('name_already_used_attribute', ['name' => $value]));
                            }
                        },
                    ])
                   ...
  }


I need to access the record to fill my $name and $itemCollectionId, how can I do this ?
Thanks in advance
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

Text Input Column Notification
FilamentFFilament / ❓┊help
3y ago
How can i access the entire table record from a custom table column
FilamentFFilament / ❓┊help
3y ago
Text column no record(s)
FilamentFFilament / ❓┊help
3y ago
Text area use in table column
FilamentFFilament / ❓┊help
2y ago