Ringer
Ringer
FFilament
Created by Ringer on 2/27/2024 in #❓┊help
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])); } }, ]) ... } I need to access the record to fill my $name and $itemCollectionId, how can I do this ? Thanks in advance
3 replies