Mutate Data before Create (calculated column)

Hello.
I need to calculate a column with series & id.
The fields are Id, Series, NumExp and I need numExp to be equal to SERIES-ID

If series is ABC and id is 20, I need numExp to be ABC20

I have tried this mutateFormDataBeforeCreate but it is not working.
protected function mutateFormDataBeforeCreate(array $data): array
    {
        $data['numExp'] =  $data['serie'] . '-' . $data['id'];
        return $data;
    }


Is there a boot method in the Model or something, please?
Tks.
Solution
Finally I have created an Observer.

Thank you.
Was this page helpful?