Sep 6, 2023
0
Level 1
Laravel Scout where
Hello, I'm mastering the search engine, I'm asking for help since I've already reviewed all the forums, but I haven't found an answer to my question. I have a table with tasks, they have statuses: "Active", "Archive" and "Deleted". How do I register where('status', '=', '0')?
Tasks::search($this->searchInput)
->where('status', 0)
->query(function (Builder $builder) {
$builder->where('f8820','=', [auth()->id()])
->orWhere('user_id', '=', [auth()->id()])
->orWhere('f8830','=', [auth()->id()])
->orWhereRaw('FIND_IN_SET(?, REPLACE(f8840, "-", ",")) > 0', [auth()->id()])
->orWhereRaw('FIND_IN_SET(?, REPLACE(f10140, "-", ",")) > 0', [auth()->id()]);
}
);
Please or to participate in this conversation.