<?php use Carbon\Carbon; ?>


<?php $__env->startSection('title', $page->heading); ?>

<?php $__env->startSection('meta_tags', $page->meta_tags); ?>

<?php $__env->startSection('meta_description', $page->meta_description); ?>

<?php $__env->startSection('header_css'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('header_js'); ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<!-- breadcrumb wrapper Start -->
<div class="breadcrumb-banner-wrapper">
  <div class="container">
    <div class="row">
      <div class="col-sm-12">
        <div class="breadcrumb-text">
          <h1 class="text-center"><?php echo e($page->heading); ?></h1>
          <div class="breadcrumb-bar">
            <ul class="breadcrumb text-center">
              <li><a href="<?php echo e(route('home')); ?>">Home</a></li>
              
              <li><?php echo e($page->title); ?></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- breadcrumb wrapper End --> 

<!-- Inner page wrapper start -->
<div class="inner-page-wrapper blog-details">
  
  <div class="container">
    <div class="row">
      <?php 
      $class="12";
      $newsExists = $relatedPages->count();
      if($newsExists) {
        $class = '8';
      }
      ?>
      <div class="col-md-<?php echo e($class); ?> col-sm-12">
        <div class="about-img hidden-sm hidden-xs"> 
        <?php if($page->attachment && file_exists('uploads/pages/'.$page->attachment)) { ?>
          <img class="img-responsive" style="width:100%; height:auto;" src="<?php echo e(asset('uploads/pages/'.$page->attachment)); ?>" alt="<?php echo e($page->heading); ?> - Image"> 
        <?php } ?>

        </div>
        <div class="about-text-container">
          <?php echo $page->description; ?>

        </div>
      </div>
    
      <?php if($newsExists) { ?>
      <div class="col-md-4 col-sm-12">
        <div class="widget">
          <h6 class="text-uppercase widget-title">Explore More</h6>
          <ul class="recent-posts">
            <?php 
            $imgSrc = asset('img/no_image_biography.png');
            foreach($relatedPages as $row) { 
              // $carbonPublishedDate = Carbon::createFromFormat('Y-m-d', $row->publish_date);
              if(file_exists('uploads/pages/'.$row->attachment) && $row->attachment) {
                $imgSrc = asset('uploads/pages/thumbs/'.$row->attachment);
              } else {
                $imgSrc = asset('img/no_image_biography.png');
              }
            ?>
            <li>
              <?php /*if(file_exists('uploads/pages/'.$row->attachment && $row->attachment)) {*/ ?>
              <div class="widget-posts-image"> 
                <a href="<?php echo e(route('page.details', [$row->slug])); ?>"><img width="90px" height="" class="img-responsive" src="<?php echo e($imgSrc); ?>" alt="<?php echo e($row->heading); ?> - Image"></a> 
              </div>
              <?php /*}*/ ?>
              <div class="widget-posts-body">
                <h6 class="widget-posts-title"><a href="<?php echo e(route('page.details', [$row->slug])); ?>"><?php echo e(Helper::string_limit($row->title, 30)); ?></a></h6>
                <div class="widget-posts-meta"><?php echo e(Helper::string_limit($row->short_description, 50)); ?> </div>
              </div>
            </li>
            <?php } ?>
          </ul>
        </div>
      </div>  
    <?php } ?>
    </div>
  </div>
</div>
<!-- Inner page wrapper end --> 

<?php $__env->stopSection(); ?>

<?php $__env->startSection('footer_js'); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.container', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>