{{ Auth::user()->name }}'s Journal
{{ $date->format('D, j M Y') }}

New Entry

{{ $date->format('D, j M Y') }}

{{ $entries->count() }} {{ \Illuminate\Support\Pluralizer::plural('entry', $entries->count()) }}
% Daily goal
Calories {{ number_format($sums['calories']) }}
{{ $dailyGoals['calories'] ?? 'N/A' }}
Fat {{ number_format($sums['fat']) }}g
{{ $dailyGoals['fat'] ?? 'N/A' }}
Cholesterol {{ number_format($sums['cholesterol']) }}mg
{{ $dailyGoals['cholesterol'] ?? 'N/A' }}
Sodium {{ number_format($sums['sodium']) }}mg
{{ $dailyGoals['sodium'] ?? 'N/A' }}
Carbohydrates {{ number_format($sums['carbohydrates']) }}g
{{ $dailyGoals['carbohydrates'] ?? 'N/A' }}
Protein {{ number_format($sums['protein']) }}g
{{ $dailyGoals['protein'] ?? 'N/A' }}
@foreach(['breakfast', 'lunch', 'dinner', 'snacks'] as $meal)

{{ Str::ucfirst($meal) }}

@foreach(\App\Support\Nutrients::$all as $nutrient) {{ round($entries->where('meal', $meal)->sum($nutrient['value']), 2) }}{{ $nutrient['unit'] }} {{ $nutrient['value'] }}@if(!$loop->last), @endif @endforeach

@forelse($entries->where('meal', $meal) as $entry)
{{ $entry->summary }}
nutrients: @foreach(\App\Support\Nutrients::$all as $nutrient) {{ round($entry->{$nutrient['value']}, 2) }}{{ $nutrient['unit'] }} {{ $nutrient['value'] }}@if(!$loop->last), @endif @endforeach
@if($entry->foods()->exists())
foods: @foreach($entry->foods as $food) {{ $food->name }}@if(!$loop->last), @endif @endforeach
@endif @if($entry->recipes()->exists())
recipes: @foreach($entry->recipes as $recipe) {{ $recipe->name }}@if(!$loop->last), @endif @endforeach
@endif
@empty No entries. @endforelse
@endforeach