get('search')) { $query->where('recipes.name', 'like', "%{$term}%") ->orWhere('recipes.description', 'like', "%{$term}%") ->orWhere('recipes.source', 'like', "%{$term}%"); } else { $this->filterWithScopes($query, $filters); } } /** * Ingredient amount relationships. */ protected function ingredientAmounts(): MorphHasMany { return $this->morphMany($this->hasMany('ingredientAmounts')); } /** * Step relationships. */ protected function steps(): HasMany { return $this->hasMany(); } /** * Tag relationships. */ protected function tags(): HasMany { return $this->hasMany(); } }