

        
        <?php echo $__env->make('include.admin.backend_header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        
        
      
      <!-- Left side column. contains the logo and sidebar -->
         <?php echo $__env->make('include.admin.backend_sidebar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

      <!-- Content Wrapper. Contains page content -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Package List
           
          </h1>
          <ol class="breadcrumb">
            <li><a href="<?php echo e(URL::to('admin/dashboard')); ?>"><i class="fa fa-dashboard"></i> Home</a></li>
            
            <li class="active">Package List</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-xs-12">
              

              <div class="box">
                <!--<div class="box-header">
                  <h3 class="box-title">Data Table With Full Features</h3>
                </div>-->
                  
               
                  <!-- /.box-header -->
                <div class="box-body">
                  <table id="example1" class="table table-bordered table-striped">
                    <thead>
                      <tr>
                         <th>Sl No.</th>
                          <th>Package Name</th>
                          <th>Period</th>
                          <th>Rate</th>
                          <th>Manage</th>                  
                        </tr>
                    </thead>
                       <tbody>
                      
                           <?php
									$serial = 0;
									foreach($data as $pckg_dtls)
									{
								  $id=$pckg_dtls->id;
										
										?> 
                   
                      <tr>
                          <td><?php echo ++$serial;?></td>
                          <td><?php echo $pckg_dtls->package_name;?></td>
                          <td><?php echo $pckg_dtls->period;?></td>
                          <td><?php echo $pckg_dtls->rate;?></td>
                          <td><a href='package-list-edit/<?php echo e($id); ?>'>
                        <p class="fa fa-edit"> Edit </p>
                        </a> &nbsp; <a href="#" package_id="<?php echo $pckg_dtls->package_id;?>" class="pckg_delete" >
                        <p class="fa fa-trash-o"> Delete </p>
                        </a></td>
                          
                          
                                   
                        </tr>
                     
                    
                      
                      <?php
				         }
                          ?>
                          </tbody>
                    <tfoot>
                      <tr>
                     <th>Sl No.</th>
                          <th>Package Name</th>
                          <th>Period</th>
                          <th>Rate</th>
                          <th>Manage</th> 
                      </tr>
                    </tfoot>
                  </table>
                     <div class="delete_show"></div>
                </div><!-- /.box-body -->
              </div><!-- /.box -->
            </div><!-- /.col -->
          </div><!-- /.row -->
        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
      <?php echo $__env->make('include.admin.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      <!-- Control Sidebar -->
      <!-- /.control-sidebar -->
      <!-- Add the sidebar's background. This div must be placed
           immediately after the control sidebar -->
      <div class="control-sidebar-bg"></div>
    </div><!-- ./wrapper -->

    <!-- jQuery 2.1.4 -->
    <script src="<?php echo e(asset('assets/admin/plugins/jQuery/jQuery-2.1.4.min.js')); ?>"></script>
    <!-- Bootstrap 3.3.5 -->
    <script src="<?php echo e(asset('assets/admin/bootstrap/js/bootstrap.min.js')); ?>"></script>
    <!-- DataTables -->
    <script src="<?php echo e(asset('assets/admin/plugins/datatables/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/admin/plugins/datatables/dataTables.bootstrap.min.js')); ?>"></script>
    <!-- SlimScroll -->
    <script src="<?php echo e(asset('assets/admin/plugins/slimScroll/jquery.slimscroll.min.js')); ?>"></script>
    <!-- FastClick -->
    <script src="<?php echo e(asset('assets/admin/plugins/fastclick/fastclick.min.js')); ?>"></script>
    <!-- AdminLTE App -->
    <script src="<?php echo e(asset('assets/admin/dist/js/app.min.js')); ?>"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="<?php echo e(asset('assets/admin/dist/js/demo.js')); ?>"></script>
    <!-- page script -->
    <script>
      $(function () {
        $("#example1").DataTable();
        $('#example2').DataTable({
          "paging": true,
          "lengthChange": false,
          "searching": false,
          "ordering": true,
          "info": true,
          "autoWidth": false
        });
      });
    </script>


  <script type="text/javascript">
	$(document).ready(function(){
	$(".pckg_delete").click(function(){
							var thiss=$(this);
							var r = confirm("Do you want to delete?");
							
							if(r==true){
								var value =$(this).attr('package_id') ;
								$.ajax({
									   url: "<?php echo e(url('admin/package-delete')); ?>",
									   method:'get',
									   data:{'id':value},
									   success:function(packgedel){
                       $(".delete_show").show();
									   console.log(packgedel);
										  if(packgedel==1){
												thiss.parent().parent().hide();
														}
													 else{
                             $(".delete_show").html('<div class="alert alert-danger">Fail to delete try again!!</div>'); 
          setTimeout(function(){$(".delete_show").hide(); }, 3000);
												
														 }
										                        }
									   });
								         }
												 
				       });					   
				 });
	
</script>

  </body>
</html>
