get('search')) { $query->where('foods.name', 'like', "%{$term}%") ->orWhere('foods.detail', 'like', "%{$term}%") ->orWhere('foods.brand', 'like', "%{$term}%"); } else { $this->filterWithScopes($query, $filters); } } /** * Tag relationships. */ protected function tags(): HasMany { return $this->hasMany(); } }