@extends('layouts.admin') @section('title', 'Caterer Item') @section('content') Caterer Item Caterer Item Edit Update Caterer Item {{ Html::ul($errors->all()) }} @csrf Fill details to submit Add Meal Choice Count Add Meal Choice Count Add Meal Choice Count @if (Session::has('message')) {{ Session::get('message') }} @endif @php $meal_type_items=[]; @endphp @foreach($meal_types as $meal_type) @php $meal_type_items = DB::table('meal_type_items')->where('meal_type_id',$meal_type->id)->get(); @endphp {{$meal_type->title}} @foreach($meal_type_items as $meal_type_item) @php $caterer_item_meal_type_items_count=DB::table('caterer_item_meal_type_items')->where('meal_type_item_id',$meal_type_item->id)->where('caterer_item_id',$id)->whereNull('deleted_at')->count(); $caterer_item_meal_type_items=DB::table('caterer_item_meal_type_items')->where('meal_type_item_id',$meal_type_item->id)->where('caterer_item_id',$id)->whereNull('deleted_at')->get(); @endphp @if($caterer_item_meal_type_items_count>0) @foreach($caterer_item_meal_type_items as $caterer_item_meal_type_item) id==$caterer_item_meal_type_item->meal_type_item_id) selected="" @endif>{{$meal_type_item->title}} @endforeach @else {{$meal_type_item->title}} @endif @endforeach @endforeach Addon Items @foreach($addon_category_items as $val) @php $getRec=DB::table('caterer_item_addons')->where('caterer_item_id',$id)->where('addon_item_id',$val->id)->whereNull('deleted_at')->first(); @endphp {{$val->title}} ({{$val->cat_name}}) @endforeach Addon Items Price @foreach($addon_category_items as $val) @php $getRec=DB::table('caterer_item_addons')->where('caterer_item_id',$id)->where('addon_item_id',$val->id)->whereNull('deleted_at')->first(); @endphp {{$val->title}} ({{$val->cat_name}}) @endforeach Add Meal Choice Count Add Meal Choice Count {{ Form::close() }} @endsection @section('footer-scripts') @include('scripts.carterer') @endsection