@extends('homepage.layouts.master', ['typeHeader' => 'headerPage']) @section('page-css') @endsection @section('page-content') @if ($recipeDetail) @endif
{{--

Trang chủ / Công thức

{{ $recipeDetail['name'] }}

--}} @include('homepage.commons.breadcrumb', [ 'link' => _t(strtolower($langCode) . '.global.homepage.home'), 'title' => _t(strtolower($langCode) . '.global.homepage.recipe'), 'subtitle' => $recipeDetail['name'], ])
{{ $recipeDetail['name'] }}
Cooking time icon

{{ !empty($recipeDetail['content']) ? $recipeDetail['content']->cooking_duration : '' }}

Calories icon

{{ !empty($recipeDetail['content']) ? $recipeDetail['content']->calories : '' }}

Share icon

{{ _t(strtolower($langCode) . '.global.homepage.detail.share') }}

@if (!empty($recipeDetail['content']))

{{ !empty($recipeDetail['content']) ? $recipeDetail['content']->description : '' }}

{{ str_replace('{calories}', !empty($recipeDetail['content']) ? $recipeDetail['content']->calories : '', _t(strtolower($langCode) . '.global.homepage.detail.calories_description')) }}

{{ _t(strtolower($langCode) . '.global.homepage.detail.ingredients') }} {{ _t(strtolower($langCode) . '.global.homepage.detail.part_one_person') }}

    @foreach ($recipeDetail['content']->ingredient as $key => $itemRecipe)
  • {{ $key + 1 }}. {{ $itemRecipe->name }}
  • @endforeach

{{ _t(strtolower($langCode) . '.global.homepage.detail.how_to_cook') }}

@foreach ($recipeDetail['content']->step as $key => $itemRecipeStep)

{{ $key + 1 }}. {{ $itemRecipeStep->name }}

@if (!empty($itemRecipeStep->detail) && is_array($itemRecipeStep->detail)) @foreach ($itemRecipeStep->detail as $key => $itemRecipeStepDetail)

{{ $itemRecipeStepDetail }}

@endforeach @endif
@endforeach
@endif
@if ($recipeDetail['youtube_videos'])

{{ _t(strtolower($langCode) . '.global.homepage.detail.video_recipe') }}

@php $countVideo = count($recipeDetail['youtube_videos']) > 4 ? 4 : count($recipeDetail['youtube_videos']); @endphp @foreach (array_slice($recipeDetail['youtube_videos'], 0, $countVideo) as $key => $itemRecipeVideo)
{{ $itemRecipeVideo['title'] }} play

{!! $itemRecipeVideo['title'] !!}

@endforeach
@endif
@endsection @section('page-js') @endsection