Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions app/Services/GlobalSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,21 @@ public function search(string $filterKey, ?string $query = null): LengthAwarePag
'Activities' AS category,
description,
picture AS thumbnail,
event_url AS path,
'external' AS link_type,
CASE
WHEN COALESCE(slug,'') <> ''
THEN CONCAT('/view/', id, '/', slug)
WHEN COALESCE(event_url,'') <> ''
THEN CASE
WHEN LEFT(event_url, 4) = 'http' THEN event_url
ELSE CONCAT('http://', event_url)
END
ELSE '/events'
END AS path,
CASE
WHEN COALESCE(slug,'') <> '' THEN 'internal'
WHEN COALESCE(event_url,'') <> '' THEN 'external'
ELSE 'internal'
END AS link_type,
'en' AS language,
created_at,
'' AS unique_identifier,
Expand Down Expand Up @@ -277,8 +290,21 @@ public function search(string $filterKey, ?string $query = null): LengthAwarePag
'Activities' AS category,
description,
picture AS thumbnail,
event_url AS path,
'external' AS link_type,
CASE
WHEN COALESCE(slug,'') <> ''
THEN CONCAT('/view/', id, '/', slug)
WHEN COALESCE(event_url,'') <> ''
THEN CASE
WHEN LEFT(event_url, 4) = 'http' THEN event_url
ELSE CONCAT('http://', event_url)
END
ELSE '/events'
END AS path,
CASE
WHEN COALESCE(slug,'') <> '' THEN 'internal'
WHEN COALESCE(event_url,'') <> '' THEN 'external'
ELSE 'internal'
END AS link_type,
'en' AS language,
created_at,
'' AS unique_identifier,
Expand Down
Loading