<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-body">
    <h4 class="card-title">Update News</h4>
    <h6 class="card-subtitle"></h6>
      <div class="x_content">
        <form id="demo-form2" action="<?php echo e(url('/admin/addnews/'.$published_nws->id)); ?>" method="post" data-parsley-validate class="form-horizontal form-label-left">
          <input name="_method" type="hidden" value="PUT">
          <?php echo e(csrf_field()); ?>

          <div class="form-group">
            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Title <span class="required">*</span>
            </label>
            <div class="col-md-6 col-sm-6 col-xs-12">
              <input type="text" id="first-name" name="title" required="required" class="form-control col-md-7 col-xs-12" value="<?php echo e($published_nws->title); ?>">
              <?php if($errors->has('title')): ?>
                  <span class="help-block">
                      <strong><?php echo e($errors->first('title')); ?></strong>
                  </span>
              <?php endif; ?>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Content <span class="required">*</span>
            </label>
            <div class="col-md-6 col-sm-6 col-xs-12">
              <textarea name="content" required="required" class="form-control col-md-7 col-xs-12"><?php echo e($published_nws->content); ?></textarea>
              <?php if($errors->has('content')): ?>
                  <span class="help-block">
                      <strong><?php echo e($errors->first('content')); ?></strong>
                  </span>
              <?php endif; ?>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">Active <span class="required">*</span>
            </label>
            <div class="col-md-6 col-sm-6 col-xs-12">
              <input type="checkbox" name="active" class="form-control col-md-7 col-xs-12" <?php if($published_nws->active): ?> checked="checked" <?php endif; ?> />
              <?php if($errors->has('active')): ?>
                  <span class="help-block">
                      <strong><?php echo e($errors->first('active')); ?></strong>
                  </span>
              <?php endif; ?>
            </div>
          </div>

          <div class="ln_solid"></div>
          <div class="form-group">
            <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
              <button type="submit" class="btn btn-success">Submit</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
<div class="card">
  <div class="card-body">
    <h4 class="card-title">News History</h4>
      <div class="x_content">
        <table id="datatable-fixed-header" class="table table-striped table-bordered">
          <thead>
            <tr>
              <th>Title</th>
              <th>Content</th>
              <th>Active</th>
              <th>Created at</th>
              <th>Action</th>
            </tr>
          </thead>


          <tbody>
          <?php $__currentLoopData = $published_news; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $news): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
              <td><?php echo e($news->title); ?></td>
              <td><?php echo e($news->content); ?></td>
              <td><?php echo e($news->active); ?></td>
              <td><?php echo e($news->created_at); ?></td>
              <td>
                <a type="button" class="btn btn-success" href="<?php echo e(url('/admin/addnews'.'/'.$news->id)); ?>">Edit</button>
              </td>
            </tr>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </tbody>
        </table>
      </div>
    </div>
  </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('javascript'); ?>
<script>
  jQuery(document).ready(function() {
   jQuery('#datatable-fixed-header').DataTable({
      fixedHeader: true
    });
  });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\xampp\htdocs\yespropmart2.loc\resources\views/admin/admintools/addnews_edit.blade.php ENDPATH**/ ?>