@extends('layouts.app') @section('title', 'Recipes') @section('content')
| Recipe | Portions | Ingredients | Batch cost | Per portion | Actions |
|---|---|---|---|---|---|
|
{{ $recipe->name }}
{{ $recipe->portion_size ? (float) $recipe->portion_size . ' ' . $recipe->portion_unit . ' per portion' : '—' }}
|
{{ (int) $recipe->portions }} |
{{ $recipe->items->count() }} ingredients
@if($recipe->items->count())
{{ $recipe->items->take(3)->map(fn ($line) => $items->firstWhere('id', $line->item_id)?->name)->filter()->implode(', ') }}{{ $recipe->items->count() > 3 ? '…' : '' }}
@endif
|
{{ money($cost['total']) }} | {{ money($cost['per_portion']) }} |
|