@extends('admin.layout.layout') @section('content')

Program Meal

@foreach ($program_meals as $program_meal) @php $bmi_ranges = []; foreach ($program_meal->bmi_range_meals as $bmi_range_meal) { $bmi_ranges[] = $bmi_range_meal->bmi_range->bmi_from . ' - ' . $bmi_range_meal->bmi_range->bmi_to; } $comma_separated_bmi = implode(', ', $bmi_ranges); @endphp @endforeach
S.NO BMI Gender Meal Name Calories Protein Carbs Fats Action
{{ $loop->iteration }} {{ $comma_separated_bmi }} {{ $program_meal->gender }} {{ $program_meal->meal_name }} {{ $program_meal->calories }} {{ $program_meal->protein }} {{ $program_meal->carbs }} {{ $program_meal->fats }}
{{-- Data Table Code --}} {{-- Opening modal if any error exists --}} @if ($errors->any()) @endif @endsection