@extends('layouts.homeapp')
@section('content')

<!-- ======= My Account Section ======= -->
<section id="profile" class="shadow  profile mt-5 pb-5">
 <div class="container">
    <div class="card">
      <div class="card-header">
        <div class="section-title" data-aos="fade-up">
          <h2 class="pt-4">My Profile</h2>
          <div class="mt-3">
            @if($profileUrl != '')
              <img src="{{$profileUrl}}" alt="avatar" width="75px" id="imgImage"/>
            @else
              <img src="{{asset('assets/images/demo-avatar.png')}}" alt="avatar" width="75px" id="imgImage"/>
            @endif
            <h4 class="text-uppercase mt-3">{{$User->name}}</h4>
            <p><a href="{{route('editprofile')}}">Edit</a></p>
          </div>
        </div>
      </div>
    </div>
    @foreach($PersonalInfos as $PersonalInfo)
    <div class="card mt-5">
      <div class="card-header">
        <h5>{{$PersonalInfo->addresstype->title}}</h5>
      </div>
      <div class="card-body">
        <div class="row">
          <div class="col-sm-4 form-group">
              <label><b>House Name/No.</b> : {{$PersonalInfo->housename}}</label>
          </div>
          <div class="col-sm-4 form-group">
              <label><b>Street</b> : {{$PersonalInfo->street}}</label>
          </div>
          <div class="col-sm-4 form-group">
              <label><b>Landmark</b> : {{$PersonalInfo->landmark}}</label>
          </div>
          <div class="col-sm-4 form-group">
              <label><b>City</b> : {{$PersonalInfo->city}}</label>
          </div>
          <div class="col-sm-4 form-group">
              <label><b>State</b> : {{$PersonalInfo->state}}</label>
          </div>
          <div class="col-sm-4 form-group">
              <label><b>Pincode</b> : {{$PersonalInfo->pin}}</label>
          </div>
        </div>
        <div class="card-footer">
          <a href="{{route('Profile.edit', $PersonalInfo->id)}}">Edit</a>
        </div>  

      </div>
    </div>
    @endforeach    
      
  </div>
</section><!-- End My Account Section -->