diff --git a/laravel.php b/laravel.php index 76652d9..2b18570 100644 --- a/laravel.php +++ b/laravel.php @@ -40,9 +40,12 @@ $title = $hit['h1']; $subtitle = $hasSubtitle ? $hit['h2'] : null; - if ($hasSubtitle && $hasText) { - $title = $hit['h2']; + if ($hasText) { $subtitle = $hit['_highlightResult']['content']['value']; + + if ($hasSubtitle) { + $title = "{$title} ยป {$hit['h2']}"; + } } $title = strip_tags(html_entity_decode($title, ENT_QUOTES, 'UTF-8'));