Added update or create record on import
This commit is contained in:
@@ -25,12 +25,16 @@ class CompanyImporter extends Importer
|
||||
|
||||
public function resolveRecord(): ?Company
|
||||
{
|
||||
return Company::updateOrCreate([
|
||||
'name' => $this->data['name']
|
||||
]
|
||||
);
|
||||
// return Company::firstOrNew([
|
||||
// // Update existing records, matching them by `$this->data['column_name']`
|
||||
// 'email' => $this->data['email'],
|
||||
// ]);
|
||||
|
||||
return new Company();
|
||||
// return new Company();
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Import $import): string
|
||||
|
||||
Reference in New Issue
Block a user