This commit is contained in:
f4ilji
2024-12-24 17:00:55 +05:00
parent 17444f4d12
commit 99e012d727
+3 -3
View File
@@ -51,16 +51,16 @@ class SearchController extends Controller
$results = Search::new()
->add(Post::where('status', '=', 'published'), ['title', 'search_data'])
->add(Post::where('status', '=', 'published'), ['title', 'search_data'], 'publish_at')
->add(Page::with('section')->where('searchable', '=', true), ['title', 'search_data'])
->add(Event::where('event_date_start', '>', Date::now()), 'title')
->add(Event::where('event_date_start', '>', Date::now()), 'title', 'created_at')
->add(AdditionalEducation::where('is_active', '=', true), 'title')
->add(EducationalGroup::with('schedules'), 'title')
->add(EducationalProgram::where('status', '=', true)->whereHas('admission_plans'), 'name')
->add(Faculty::where('is_active', '=', true), 'title')
->add(User::whereHas('userDetail'), 'name')
->orderByDesc()
// ->beginWithWildcard()
->beginWithWildcard()
// ->orderByRelevance()
->includeModelType()
->ignoreCase(true)