Skip to content

Commit 5562093

Browse files
committed
Add publication date to card
1 parent 206317e commit 5562093

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/SolrImporter.php

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public function import(array $data, string $contentType, string $table, string $
6161
$doc->searchImage = $record[$image]['data']['thumbnails'][13]['url'];
6262
}
6363
}
64+
if(Arr::exists($record, 'publication_date')){
65+
$doc->publication_date = $record['publication_date'];
66+
}
6467
// Section
6568
if (Arr::exists($record, 'section')) {
6669
if (Arr::accessible($record['section'])) {

resources/views/components/solr-card.blade.php

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
<div class="card-body h-100">
1616
<div class="contents-label mb-3">
1717
<h3><a href="{{ $result['url'][0] }}" class="stretched-link">{{ $result['title'][0] }}</a></h3>
18+
@isset($result['publication_date'][0])
19+
<p class="text-info">{{ $result['publication_date'][0] }}</p>
20+
@endisset
1821
</div>
1922
</div>
2023
</div>

0 commit comments

Comments
 (0)