<?php use Carbon\Carbon; ?>


<?php $__env->startSection('title', 'Recent News'); ?>

<?php $__env->startSection('meta_tags', env('APP_NAME').' News Articles'); ?>

<?php $__env->startSection('meta_description', 'News from '.env('APP_NAME')); ?>

<?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">News & Events</h1>
          <div class="breadcrumb-bar">
            <ul class="breadcrumb text-center">
              <li><a href="<?php echo e(route('home')); ?>">Home</a></li>
              
              <li>News & Events</li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<!-- breadcrumb wrapper End --> 

<!-- Inner page wrapper start -->
<div class="inner-page-wrapper ">
  <div class="container">
    <div class="row"> 
    <?php 
            foreach($news as $row) { 
              $carbonPublishedDate = Carbon::createFromFormat('Y-m-d', $row->publish_date);
              if($row->attachment and file_exists('./uploads/news/thumbs/'.$row->attachment)) {
                $imgSrc = 'uploads/news/thumbs/'.$row->attachment;
              } else {
                $imgSrc = 'img/no_image_news.png';
              }
            ?>
      <!-- Start Single Blog Post -->
      <div class="col-sm-4" style="margin-bottom:20px;">
        <div class="single-blog-post">
          <div class="single-blog-thumb"> <a href="<?php echo e(route('news.details', [$row->slug])); ?>"><img class="img-responsive" src="<?php echo e(asset($imgSrc)); ?>" alt="<?php echo e($row->title); ?> - Image" /></a></div>
          <div class="single-post-content">
            <h4><a href="<?php echo e(route('news.details', [$row->slug])); ?>"><?php echo e(Helper::string_limit($row->title, 35)); ?></a></h4>
            <ul class="post-meta">
              <li><a href="#"><i class="fa fa-calendar"></i> <?php echo e($carbonPublishedDate->toFormattedDateString()); ?></a> </li>
            </ul>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
          </div>
        </div>
      </div>
      <!-- End Single Blog Post --> 
       <?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(); ?>