@php use App\Models\KitchenRecipe; $editing = $recipe !== null; $action = $editing ? route('kitchen.recipes.update', $recipe) : route('kitchen.recipes.store'); $method = $editing ? 'PUT' : 'POST'; $sel = $sel ?? 'h-9 w-full rounded-lg border border-input bg-transparent px-3 text-sm outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50'; $ings = $editing ? $recipe->ingredients : collect(); $comp = $editing ? $recipe->composed->pluck('id')->all() : []; @endphp