Replicate action do not exclude passed attributes.

I need to replicate records from model 'LegacyClient' to model 'Client'.

In the 'clients' table I do not need some attributes from 'legacy_clients'. Implementing '->excludeAttributes' does not work.

->actions([
    Tables\Actions\ActionGroup::make([
        Tables\Actions\ViewAction::make(),
        Tables\Actions\EditAction::make(),

        ReplicateAction::make()
            ->excludeAttributes(['legacy_contacts_count', 'sector', 'data_record_creator', 'data_record_manager'])
            ->action(function (LegacyClient $record) {
                $data = $record->replicate();
                $data->setTable('clients');
                $data->save();
            }),

    ])
])


I get:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sector' in 'field list'.

Any advice...? thanks.
Was this page helpful?