inhaltsangabe wip
This commit is contained in:
1 parent
8ccc4a3c20
commit
3a35ccd69d
34 files changed
+281
-236
No files matched your search
@@ -10,8 +10,14 @@ class CreateProjektInhaltsverzeichnis
|
||||
{
|
||||
public static function create($record)
|
||||
{
|
||||
$inhaltsverzeichnis = Inhaltsverzeichnis::with('textblock_kennung')->get();
|
||||
$inhaltsverzeichnis = Inhaltsverzeichnis::get();
|
||||
foreach ($inhaltsverzeichnis as $inhalt) {
|
||||
|
||||
$textblock = '';
|
||||
if ($inhalt->textblock_id > 0) {
|
||||
$textblock = Textblock::where('id', $inhalt->textblock_id)->pluck('textblock')->first();
|
||||
}
|
||||
|
||||
ProjektInhaltsverzeichnis::updateOrCreate(
|
||||
[
|
||||
'projekte_id' => $record->id,
|
||||
@@ -20,9 +26,12 @@ class CreateProjektInhaltsverzeichnis
|
||||
[
|
||||
'sort' => $inhalt->sort,
|
||||
'ordnungszahl' => $inhalt->ordnungszahl,
|
||||
'name' => $inhalt->name,
|
||||
'ueberschrift_nicht_anzeigen' => $inhalt->ueberschrift_nicht_anzeigen,
|
||||
'seite' => $inhalt->seite,
|
||||
'textblock_kennung_id' => $inhalt->textblock_kennung_id,
|
||||
'textblock' => Textblock::where('id', $inhalt->textblock_kennung_id)->pluck('textblock')->first(),
|
||||
'tabellen_id' => $inhalt->tabellen_id,
|
||||
'textblock_id' => $inhalt->textblock_id,
|
||||
'textblock' => $textblock,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user