@if($recipe->getRecipeImage()) {{ $recipe->title }} @else
🍳
@endif

{{ $recipe->title }}

@if($recipe->rating_avg)
@for($i = 1; $i <= 5; $i++) @endfor {{ number_format($recipe->rating_avg, 1) }} ({{ $recipe->rating_count }} {{ Str::plural('rating', $recipe->rating_count) }})
@endif {{ $recipe->views_count }} views
@auth @endauth

{{ $recipe->description }}

@if($recipe->prep_time)
{{ $recipe->prep_time }}
Prep Time
@endif @if($recipe->cook_time)
{{ $recipe->cook_time }}
Cook Time
@endif @if($recipe->servings)
{{ $recipe->servings }}
Servings
@endif @if($recipe->difficulty)
{{ $recipe->difficulty }}
Difficulty
@endif
@if($recipe->tags->count() > 0)
@foreach($recipe->tags as $tag) {{ $tag->name }} @endforeach
@endif
@if($recipe->ingredients->count() > 0)

🛒 Ingredients

    @foreach($recipe->ingredients->sortBy('pivot.sort_order') as $ingredient)
  • {{ $ingredient->pivot->quantity }} {{ $ingredient->pivot->unit }} {{ $ingredient->name }} @if($ingredient->pivot->notes) ({{ $ingredient->pivot->notes }}) @endif
  • @endforeach
@endif @if($recipe->steps->count() > 0)

👨‍🍳 Instructions

    @foreach($recipe->steps->sortBy('sort_order') as $step)
  1. {{ $step->step_number }}
    @if($step->title)

    {{ $step->title }}

    @endif

    {{ $step->instruction }}

    @if($step->time_estimate)

    ⏱️ ~{{ $step->time_estimate }} minutes

    @endif
  2. @endforeach
@endif

💬 Comments ({{ $recipe->comments->count() }})

@auth
@else

Log in to leave a comment

@endauth
@forelse($recipe->comments as $comment)
{{ strtoupper(substr($comment->user->name, 0, 1)) }}
{{ $comment->user->name }}
{{ $comment->created_at->diffForHumans() }}

{{ $comment->comment }}

@empty

No comments yet. Be the first to comment!

@endforelse
@if($recipe->nutrition)

📊 Nutrition Facts

@if($recipe->nutrition->calories)
Calories {{ $recipe->nutrition->calories }}
@endif @if($recipe->nutrition->protein)
Protein {{ $recipe->nutrition->protein }}g
@endif @if($recipe->nutrition->carbohydrates)
Carbs {{ $recipe->nutrition->carbohydrates }}g
@endif @if($recipe->nutrition->fat)
Fat {{ $recipe->nutrition->fat }}g
@endif
@endif @auth

Rate this Recipe

@for($i = 1; $i <= 5; $i++) @endfor
@if($recipe->userRating(auth()->user()))

You rated this {{ $recipe->userRating(auth()->user()) }} star{{ $recipe->userRating(auth()->user()) > 1 ? 's' : '' }}

@endif
@endauth @if($similarRecipes->count() > 0) @endif
@auth @endauth