
<?php $__env->startSection('content'); ?>
<!-- Content Header (Page header) -->
<div class="content-header">
  <div class="container-fluid">
    <div class="row mb-2">
      <div class="col-sm-6">
        <h1 class="m-0 text-dark">All Posts</h1>
      </div><!-- /.col -->
      <div class="col-sm-6">
        <ol class="breadcrumb float-sm-right">
          <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>">Home</a></li>
          <li class="breadcrumb-item active">Posts
      </div><!-- /.col -->
    </div><!-- /.row -->
  </div><!-- /.container-fluid -->
</div>



          <div class="card">
            <div class="card-header">
              <h3 class="card-title"> Posts Table</h3>
              <button class="btn btn-danger btn-sm" style="float: right;"><a href="<?php echo e(URL::to('/insert/post')); ?>"><span style="color: white;">&nbsp;Add News</span></a></button>
            </div>
            <!-- /.card-header -->
            <div class="card-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>Category </th>
                  <th>SubCategory </th>
                  <th>Title </th>
                  <th>Thumbnail</th>
                  <th>Date</th>
                  <th>Views</th>
				  <th>Preview</th>
                  <th>Action</th>
                </tr>
                </thead>
                <tbody>
               <?php $__currentLoopData = $post; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                  <td><?php echo e($row->category_bn); ?></td>
                  <td><?php echo e($row->subcategory_bn); ?></td>
                   <td><?php echo e($row->title_bn); ?></td>
                   <td><img src="<?php echo e(URL::to($row->image)); ?>" style="height:60px; width: 60px;"></td>
                     <td><?php echo e($row->post_date); ?></td>
                     <td><?php echo e($row->views); ?></td>
					<?php
					$slug=preg_replace('/\s+/u', '-', trim($row->title_bn ??''));
					?>
					 <td><a href="<?php echo e(URL::to('view-post/'.$row->id.'/'.$slug ??'')); ?>" class="btn btn-info"> <i class="fa fa-eye"></i> </a></td>
                  <td>
                  	  <a href="<?php echo e(route('edit.post',$row->id)); ?>" class="btn btn-info"> <i class="fa fa-edit"></i> </a>
                  	  <a href="<?php echo e(route('delete.post',$row->id)); ?>" class="btn btn-danger" id="delete"> <i class="fa fa-trash"></i> </a>
                  </td>
                </tr>
            	<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <tfoot>
                <tr>
                 <th>Category </th>
                  <th>SubCategory </th>
                  <th>Title </th>
                  <th>Thumbnail</th>
                  <th>Date</th>
                  <th>Views</th>
				  <th>Preview</th>
                  <th>Action</th>
                </tr>
                </tfoot>
              </table>
            </div>
            <!-- /.card-body -->
          </div>



<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/elitedesignbd/news3.elitedesign.com.bd/resources/views/backend/post/index.blade.php ENDPATH**/ ?>