diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 25c44ce..d6e8795 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -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)