components([ TextInput::make('name') ->required(), TextInput::make('type') ->required(), Select::make('responsible_id') ->relationship('responsible', 'name') ->required(), TextInput::make('contractable_id') ->numeric(), TextInput::make('contractable_type'), ]); } public function table(Table $table): Table { return $table ->recordTitleAttribute('name') ->columns([ TextColumn::make('name') ->searchable(), TextColumn::make('type') ->searchable(), TextColumn::make('responsible.name') ->searchable(), TextColumn::make('contractable_id') ->numeric() ->sortable(), TextColumn::make('contractable_type') ->searchable(), TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), TextColumn::make('updated_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->filters([ // ]) ->headerActions([ CreateAction::make(), AssociateAction::make(), ]) ->recordActions([ EditAction::make(), DissociateAction::make(), DeleteAction::make(), ]) ->toolbarActions([ BulkActionGroup::make([ DissociateBulkAction::make(), DeleteBulkAction::make(), ]), ]); } }