Tables\Actions\CreateAction::make()->mutateFormDataUsing(function (array $data) {
$data['type'] = UserTypeEnum::PARTNER;
$data['password'] = ($this->password = Hash::make(Str::random(15))); // don't work on a static method
return $data;
})->after(fn () => Mail::to($this->record)->send(
new UserCredentials($this->record, $this->password)
)),
Tables\Actions\CreateAction::make()->mutateFormDataUsing(function (array $data) {
$data['type'] = UserTypeEnum::PARTNER;
$data['password'] = ($this->password = Hash::make(Str::random(15))); // don't work on a static method
return $data;
})->after(fn () => Mail::to($this->record)->send(
new UserCredentials($this->record, $this->password)
)),