Hi again everyone!
I think it maybe helpful to someone
I have solved this problem by search from other way around
Element::WhereHas('category' function($query) use( $category_ids){ $query->where('category_id' $category_ids); })->get();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community