gepesivan
gepesivan
FFilament
Created by gepesivan on 1/26/2024 in #❓┊help
Updating existing records when importing
This is how i solved it:

public function resolveRecord(): ?Product
{
return Product::firstOrNew([
'othet_model_id_id' => OtherModel::where('short_name', $this->data['other_model'])->first()?->id,
'name' => $this->data['name'],
...
]);
}

public function resolveRecord(): ?Product
{
return Product::firstOrNew([
'othet_model_id_id' => OtherModel::where('short_name', $this->data['other_model'])->first()?->id,
'name' => $this->data['name'],
...
]);
}
3 replies