Skip to content

Commit e376e66

Browse files
authored
Merge pull request #2 from EdisonReklamebyraa/main
Make it work with Statamic 4.x
2 parents 6a9ea1a + 17796da commit e376e66

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "Export Statamic Entries as PDF",
44
"license": "MIT",
55
"require": {
6-
"statamic/cms": "^3.0.0",
7-
"barryvdh/laravel-dompdf": "^1.0.0"
6+
"statamic/cms": "^4.0.0",
7+
"barryvdh/laravel-dompdf": "^2.0.0"
88
},
99
"autoload": {
1010
"psr-4": {

resources/views/pdf.blade.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
.page-break {
1313
page-break-after: always;
1414
}
15+
.bold {
16+
font-weight: 700;
17+
}
1518
</style>
1619
</head>
1720

@@ -22,7 +25,7 @@
2225
<h3>{{ $e['value'] }}</h3>
2326
@else
2427
@if (!empty($e))
25-
<div class="label">{{ $e['name'] }}</div>
28+
<div class="label bold">{{ $e['name'] }}</div>
2629
<div class="content">{!! $e['value'] !!}</div>
2730
@endif
2831
@endif

src/Actions/StatamicEntryExportPdf.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function run($items, $values)
5353
{
5454
$firstEntry = $items->first();
5555
$entryFields = $firstEntry->blueprint()
56-
->sections()
56+
->tabs()
5757
->flatMap(fn ($section) => $section->fields()->all())
5858
->filter(fn (Field $field) => $this->shouldFieldBeIncluded($field));
5959

0 commit comments

Comments
 (0)