@php use GuzzleHttp\Client; $baseurl = 'https://propapi.testing.co.tz'; @endphp @extends('mainlayout') @section('content')
@if(session('message')) @endif

{{$profile->first_name}} {{$profile->last_name}}

@foreach($profile->likes as $like) @php $client = new Client(['base_uri' => 'https://propapi.testing.co.tz/api/v1/frontend']); $response = $client->request('POST', 'https://propapi.testing.co.tz/api/v1/frontend', [ 'form_params' => [ 'method'=>'getproperty', 'propertyid'=>$like->propertyid ] ]); $content = json_decode($response->getBody()); $data = $content->data; $property = $data->property[0]; $images = $property->propertyimage; $prop_owner = $property->propertyownerid; $client_prop = new Client(['base_uri' => 'https://propapi.testing.co.tz/api/v1/frontend']); $response_prop = $client->request('POST', 'https://propapi.testing.co.tz/api/v1/frontend', [ 'form_params' => [ 'method'=>'propertyowner', 'propertyowner'=>$prop_owner ] ]); $content_prop = json_decode($response_prop->getBody()); $propowner = $content_prop->data->propertyowner[0]; @endphp @endforeach
@forelse($profile->orders as $order) @php $client = new Client(['base_uri' => 'https://propapi.testing.co.tz/api/v1/frontend']); $response = $client->request('POST', 'https://propapi.testing.co.tz/api/v1/frontend', [ 'form_params' => [ 'method'=>'getproperty', 'propertyid'=>$order->propertyid ] ]); $content = json_decode($response->getBody()); $data = $content->data; $property = $data->property[0]; $images = $property->propertyimage; $prop_owner = $property->propertyownerid; $client_prop = new Client(['base_uri' => 'https://propapi.testing.co.tz/api/v1/frontend']); $response_prop = $client->request('POST', 'https://propapi.testing.co.tz/api/v1/frontend', [ 'form_params' => [ 'method'=>'propertyowner', 'propertyowner'=>$prop_owner ] ]); $content_prop = json_decode($response_prop->getBody()); $propowner = $content_prop->data->propertyowner[0]; @endphp
@if(count($images)>0) @elseif(count($images)==0) {{$property->name}} Image @endif

Payment Process Initiated

{{$property->name}}

Order Amount : TZS {{number_format($order->initial_payment_amount)}}
@empty

No Orders Created.

@endforelse
@endsection