where('status', true) ->whereHas('range', fn (Builder $q) => $q->where('status', true)) ->orderBy('order') ->get(); return view('fo.pages.recipes.index', compact('recipes')); } /** * Recipe show * * @param \App\Models\Recipe $publishedRecipe * @return \Illuminate\Contracts\View\View */ public function show(Recipe $publishedRecipe) { return view('fo.pages.recipes.show', ['recipeModel' => $publishedRecipe]); } }