@extends('layouts.app') @section('title', 'Recipes') @section('content') @php use App\Models\KitchenRecipe; $money = fn ($v) => \App\Support\Fmt::money($v); $num = fn ($v) => \App\Support\Fmt::plain($v, 2); $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'; @endphp
Dishes, their ingredient build-up and cost per portion
| Dish | Portions | Portion size | Batch yield | Batch cost | Cost per portion | Ingredients | Actions |
|---|---|---|---|---|---|---|---|
| {{ $r->name }} | {{ $r->portions }} | {{ $num($r->portion_size) }} {{ $r->portion_unit }} | {{ $r->batch_yield ?: '—' }} | {{ $money($r->costParts()) }} | {{ $money($r->costPerPortion()) }} | {{ $r->ingredients->pluck('item.name')->filter()->join(', ') ?: '—' }} @if ($r->composed->isNotEmpty()) + {{ $r->composed->pluck('name')->join(', ') }} @endif |
|
Edit {{ $r->name }}@include('kitchen.partials.recipe-form', [ 'recipe' => $r, 'items' => $items, 'units' => $units, 'allRecipes' => $rows, 'sel' => $sel, ]) |
|||||||
| No recipes yet. Add the first dish below. | |||||||