recordTitleAttribute('ip') ->columns([ Tables\Columns\TextColumn::make('ip')->searchable(), Tables\Columns\TextColumn::make('gateway'), Tables\Columns\TextColumn::make('bridge'), Tables\Columns\TextColumn::make('netmask'), ]) ->filters([ // ]) ->headerActions([ Tables\Actions\AssociateAction::make() ->modelLabel('IPv4') ->preloadRecordSelect() ->label('Add'), ]) ->actions([ Tables\Actions\DissociateAction::make() ->label('Remove') ->before(function (Tables\Actions\DissociateAction $action, RelationManager $livewire) { if ($livewire->ownerRecord->primary_ip == $action->getRecord()->id) { Notification::make() ->danger() ->title('You cannot remove the primary IP') ->send(); $action->cancel(); } }), ]); } }