@extends('layouts.app') @section('css') @endsection @php $resto = \App\Models\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID()); $lang = $resto->default_lang; app()->setLocale($lang); if(session('app_lang') !==null){ $lang = session('app_lang'); app()->setLocale($lang); } @endphp @section('content') @php $resto = \App\Models\Restaurants::find(\App\Helpers\CommonMethods::getRestuarantID()); $restuarant1 = $resto; $resto_meta = isset($restuarant1->resto_metas)?$restuarant1->resto_metas:null; $resto_metas = []; $billing = []; if(isset($resto_meta)){ foreach($resto_meta as $meta){ // dump($meta->resto_meta_defs); $index_name = isset($meta->resto_meta_defs->parents)?$meta->resto_meta_defs->parents->meta_def_name:$meta->resto_meta_defs->meta_def_name; if(isset($_GET['debug'])){ // dump($index_name ); } if($meta->resto_meta_defs->meta_def_name=="BILLING_GATEWAY"){ // dump($meta->resto_meta_defs->meta_def_name); // $resto_metas['BILLING_GATEWAY'][] = $meta->meta_val; $billing[] = array('id'=>$meta->meta_id,'value'=>$meta->meta_val); } $resto_metas[$index_name] = $meta->meta_val; } } $resto_metas['BILLING_GATEWAY'] = $billing; $currency = isset($resto_metas['BUSSINESS_CCY'])?$resto_metas['BUSSINESS_CCY']:"IQD"; $business_type = isset($resto_metas['BUSSINESS_TYPE'])?$resto_metas['BUSSINESS_TYPE']:"Restaurants"; $allow_pre_order = isset($resto_metas['ALLOW_PRE_ORDERS'])?$resto_metas['ALLOW_PRE_ORDERS']:"No"; $business_type = trim($business_type); @endphp

{{__('label.recipe')}}

@if(isset($recipe)) {{__('label.edit')}} {!! $recipe->name !!} @else {{__('label.new_item')}} @endif
@csrf

{{__('label.cover_image')}}

main_images) && !empty($recipe->main_images->file_name)) style="background: url({!! $recipe->main_images->file_name !!})" @endif>
@if(isset($recipe) && isset($recipe->main_images) && !empty($recipe->main_images->file_name)) {{__('label.remove_image')}} @endif

* image size 1920 X 1280 pixels , size 2.4 Mb

@php $c = []; if(isset($recipe)){ $c = $recipe->categories->pluck('category_id')->toArray(); // dump($c); } @endphp
@if(isset($recipe)) show_recipe_main_price==1) checked @endif> @else @endif
@if($business_type=="ClothsStore") @php $sizes = []; $colors = []; $color_data = null; if(isset($recipe)){ $colors = \App\Models\ClothOptions::where('product_id',$recipe->id)->where('type','color')->pluck('name')->whereNull('deleted_at')->toArray(); //dump($colors); $sizes = \App\Models\ClothOptions::where('product_id',$recipe->id)->where('type','size')->pluck('name')->toArray(); $color_data = \App\Models\ClothOptions::where('product_id',$recipe->id)->whereIn('type',['color','color_image'])->whereNull('deleted_at')->get(); } @endphp
@if(isset($color_data))
@foreach( $color_data as $color) @endforeach
@if($color->img_url!="") {{__('label.delete')}}
@endif
@endif
@if(isset($recipe) && isset($recipe->galleries))
@foreach($recipe->galleries as $gallery) @endforeach
@endif
@if($business_type!="ClothsStore") @if(isset($recipe->extra_options) && $recipe->extra_options->count() > 0)

{{__('label.extra_options')}}


@foreach($recipe->extra_options as $option) @endforeach
{{__('label.option_name')}} {{__('label.price')}}Price {{__('label.items')}} {{__('label.is_mandatory')}}?
{!! $option->name !!} @if($option->name_arabic!="") ( {!! $option->name_arabic !!} ) @endif {!! $option->price !!} @if(isset($option->extra_option_items) && $option->extra_option_items->count() > 0) {!! $option->extra_option_items->count() !!} @endif @if(isset($option->extra_option_items) && $option->extra_option_items->count() > 0) is_mandatory==1) checked @endif value="" data-id="{!! $option->id !!}"> @if($option->is_mandatory==1) User can select {!! $option->mandatory_amount !!} items must @endif @endif
@endif @endif @if(isset($recipe)) @if(isset($resto_metas['ENABLED_PRODUCT_FAQS']) && $resto_metas['ENABLED_PRODUCT_FAQS']=="Yes")

{{__('label.product_faqs')}}

{{__('label.add_faq')}}
@if(isset($recipe->product_faqs) && $recipe->product_faqs->count() > 0)
@foreach($recipe->product_faqs as $faq)

{!! nl2br($faq->answer) !!}

|
@endforeach
@endif
@endif @endif
@if($business_type!="ClothsStore")
is_customized=="1") checked @endif name="is_customized" type="checkbox" />
@endif
status=="1") checked @endif name="status" type="checkbox" />
@if($allow_pre_order=="Yes")
allow_pre_order=="Yes") checked @endif name="allow_pre_order" type="checkbox" />
@endif
{{__('label.save')}} @if( isset($recipe)) {{__('label.upload_gallery')}} @if($business_type!="ClothsStore" ) {{__('label.add_extra_options')}} @endif @endif
@if( isset($recipe)) @endif @endsection @section('js') @endsection