@extends('layouts.app') @section('content') @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); } //$resto = \Illuminate\Support\Facades\Auth::user()->restaurants; $address = isset($resto->places)?$resto->places->place_name:"Baghdad"; $polygons = isset($resto->places)?$resto->places->coordinates:NULL; if(!empty($outlet->address)) $address = $outlet->address.', '.$outlet->place; // dd($resto->places->place_name); @endphp @php $restuarant1 = $resto; $resto_metas = \App\Helpers\CommonMethods::getRestoMetas($restuarant1); $currency = isset($resto_metas['BUSSINESS_CCY'])?$resto_metas['BUSSINESS_CCY']:"IQD"; $business_type = isset($resto_metas['BUSSINESS_TYPE'])?$resto_metas['BUSSINESS_TYPE']:"Restaurants"; $outlet_meta = isset($outlet->resto_metas)?$outlet->resto_metas:NULL; $outlet_metas = []; if(isset($outlet_meta)){ foreach($outlet_meta as $meta){ $index_name = isset($meta->resto_meta_defs->parents)?$meta->resto_meta_defs->parents->meta_def_name:$meta->resto_meta_defs->meta_def_name; // dump($meta->resto_meta_defs); if($index_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); } $outlet_metas[$index_name] = $meta->meta_val; } } $currency = isset($outlet_metas['BUSSINESS_CCY'])?$outlet_metas['BUSSINESS_CCY']:$resto_metas['BUSSINESS_CCY']; @endphp