Changes
This commit is contained in:
@@ -51,16 +51,16 @@ class SearchController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
$results = Search::new()
|
$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(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(AdditionalEducation::where('is_active', '=', true), 'title')
|
||||||
->add(EducationalGroup::with('schedules'), 'title')
|
->add(EducationalGroup::with('schedules'), 'title')
|
||||||
->add(EducationalProgram::where('status', '=', true)->whereHas('admission_plans'), 'name')
|
->add(EducationalProgram::where('status', '=', true)->whereHas('admission_plans'), 'name')
|
||||||
->add(Faculty::where('is_active', '=', true), 'title')
|
->add(Faculty::where('is_active', '=', true), 'title')
|
||||||
->add(User::whereHas('userDetail'), 'name')
|
->add(User::whereHas('userDetail'), 'name')
|
||||||
->orderByDesc()
|
->orderByDesc()
|
||||||
// ->beginWithWildcard()
|
->beginWithWildcard()
|
||||||
// ->orderByRelevance()
|
// ->orderByRelevance()
|
||||||
->includeModelType()
|
->includeModelType()
|
||||||
->ignoreCase(true)
|
->ignoreCase(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user