Skip to content

how to ad custom data to filament import action #15647

Answered by afariasfermin
Ardhan2121 asked this question in Help
Discussion options

You must be logged in to vote

Maybe this can work for you using the lifecycle hook

protected function afterSave(): void
{
    if ($this->record->exists) {
        $this->record->user_id = Auth::id();
        $this->saveRecord();
    }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ardhan2121
Comment options

Answer selected by Ardhan2121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants