wip
This commit is contained in:
1 parent
e7fe8de435
commit
7746b426b3
1 file changed
+9
-13
@@ -15,27 +15,23 @@ class ProjektRaeumealleImporter extends Importer
|
|||||||
|
|
||||||
protected function beforeValidate(): void
|
protected function beforeValidate(): void
|
||||||
{
|
{
|
||||||
$orientierung_zu_abschlaege = ProjektOrientierungZuAbschlaege::firstOrNew([
|
dd($this->data);
|
||||||
|
|
||||||
|
$res = ProjektOrientierungZuAbschlaege::firstOrCreate([
|
||||||
'projekte_id' => $this->options['projekte_id'],
|
'projekte_id' => $this->options['projekte_id'],
|
||||||
'top_nummer' => $this->data['top_nummer'],
|
'top_nummer' => trim($this->data['top_nummer']),
|
||||||
]);
|
]);
|
||||||
$this->data['$orientierung_zu_abschlaege'] = $orientierung_zu_abschlaege->id;
|
|
||||||
|
dd($res);
|
||||||
|
|
||||||
|
$this->data['orientierung_zu_abschlaege_id'] = $res->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function beforeSave(): void
|
|
||||||
{
|
|
||||||
dd($this->data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function resolveRecord(): ProjektRaeumealle
|
public function resolveRecord(): ProjektRaeumealle
|
||||||
{
|
{
|
||||||
$orientierung_zu_abschlaege = ProjektOrientierungZuAbschlaege::firstOrNew([
|
|
||||||
'projekte_id' => $this->options['projekte_id'],
|
|
||||||
'top_nummer' => $this->data['top_nummer'],
|
|
||||||
]);
|
|
||||||
|
|
||||||
return ProjektRaeumealle::firstOrNew([
|
return ProjektRaeumealle::firstOrNew([
|
||||||
'projekt_orientierung_zu_abschlaege_id' => $orientierung_zu_abschlaege->id,
|
'projekt_orientierung_zu_abschlaege_id' => $this->data['orientierung_zu_abschlaege_id'],
|
||||||
'projekte_id' => $this->options['projekte_id'],
|
'projekte_id' => $this->options['projekte_id'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user