File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,12 +120,14 @@ public function buildFormFields(FieldsContainer $formFields): void
120120 by {{ $author->name }}.
121121 @endif
122122 <br>
123- {{ count($linkAttachments) }} link attachments, {{ count($fileAttachments) }} file attachments.
123+ Including {{ count($attachments) }} attachments
124+ ({{ count($fileAttachments) }} files, {{ count($linkAttachments) }} links).
124125 blade, [
125126 'published_at ' => \Carbon \Carbon::parse ($ data ['published_at ' ])->isoFormat ('LLLL ' ),
126127 'author ' => \App \Models \User::find ($ data ['author_id ' ]),
127- 'linkAttachments ' => collect ($ data ['attachments ' ])->where ('is_link ' , true )->values (),
128- 'fileAttachments ' => collect ($ data ['attachments ' ])->where ('is_link ' , false )->values (),
128+ 'attachments ' => $ data ['attachments ' ] ?? [],
129+ 'linkAttachments ' => collect ($ data ['attachments ' ] ?? [])->where ('is_link ' , true ),
130+ 'fileAttachments ' => collect ($ data ['attachments ' ] ?? [])->where ('is_link ' , false ),
129131 ]);
130132 })
131133 )
You can’t perform that action at this time.
0 commit comments