HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /var/www/html/punjabcabs/storage/framework/views/4ef94b1d87fd41e4375371e2b1dcb8cb15c90374.php
<?php $__env->startSection('title', 'Promocodes '); ?>

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

    <div class="content-area py-1">
        <div class="container-fluid">
            
            <div class="row bg-title">
                <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                    <h4 class="page-title"><?php echo app('translator')->get('admin.member.promocodes'); ?></h4><a href="<?php echo e(route('admin.promocode.create')); ?>" class="btn btn-outline-warning btn-rounded w-min-sm m-l-0-75 waves-effect waves-light"><?php echo app('translator')->get('admin.member.add_new_promocode'); ?></a>
                </div>
                <div class="col-lg-6 col-sm-6 col-md-6 col-xs-12">
                    <ol class="breadcrumb">
                        <li><a href="<?php echo e(route('admin.dashboard')); ?>"><?php echo app('translator')->get('admin.dashboard'); ?></a></li>
                        <li class="active"><?php echo app('translator')->get('admin.list_promocodes'); ?></li>
                    </ol>
                </div>
            </div>

            <div class="box box-block bg-white">
                <table class="table table-striped table-bordered dataTable" id="table-2">
                    <thead>
                        <tr>
                            <th><?php echo app('translator')->get('admin.member.id'); ?></th>
                            <th><?php echo app('translator')->get('admin.member.promocode'); ?> </th>
                            <th><?php echo app('translator')->get('admin.member.discount'); ?> </th>
                            <th>Discount Type </th>
                            <th>User Type </th>
                            <th>Starting at</th>
                            <th><?php echo app('translator')->get('admin.member.expiration'); ?></th>
                            <th><?php echo app('translator')->get('admin.member.status'); ?></th>
                            <th>Valid Count</th>
                            <th><?php echo app('translator')->get('admin.member.action'); ?></th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php $__currentLoopData = $promocodes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $promo): $__env->incrementLoopIndices(); $loop = $__env->getFirstLoop(); ?>
                        <tr>
                            <td><?php echo e($index + 1); ?></td>
                            <td><?php echo e($promo->promo_code); ?></td>
                            <td><?php echo e($promo->discount); ?></td>
                            <td><?php if($promo->discount_type =='flat'): ?>
                                Flat
                                <?php else: ?>
                                Percentage
                                <?php endif; ?>
                            </td>
                            <td><?php if($promo->user_type =='all'): ?>
                                All Users
                                <?php else: ?>
                                New Users
                                <?php endif; ?>
                            </td>
                            <td>
                                <?php echo e(date('d-m-Y',strtotime($promo->starting_at))); ?>

                            </td>
                            <td>
                                <?php echo e(date('d-m-Y',strtotime($promo->expiration))); ?>

                            </td>
                            <td>
                                <?php if(date("Y-m-d") <= $promo->expiration): ?>
                                    <span class="label label-table label-primary"><?php echo app('translator')->get('admin.member.valid'); ?></span>
                                <?php else: ?>
                                    <span class="label label-table label-warning"><?php echo app('translator')->get('admin.member.expiration'); ?></span>
                                <?php endif; ?>
                            </td>
                            <td>
                                <?php echo e($promo->use_count); ?>

                            </td>
                            <td>
                                <form action="<?php echo e(route('admin.promocode.destroy', $promo->id)); ?>" method="POST">
                                    <?php echo e(csrf_field()); ?>

                                    <input type="hidden" name="_method" value="DELETE">
                                    <a href="<?php echo e(route('admin.promocode.edit', $promo->id)); ?>" class="btn btn-success btn-rounded label-left b-a-0 waves-effect waves-light"><span class="btn-label"><i class="fa fa-pencil"></i></span> <?php echo app('translator')->get('admin.member.edit'); ?></a>
                                    <button class="btn btn-danger btn-rounded label-left b-a-0 waves-effect waves-light" onclick="return confirm('Are you sure?')"><span class="btn-label"><i class="fa fa-trash"></i></span> <?php echo app('translator')->get('admin.member.delete'); ?></button>
                                </form>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getFirstLoop(); ?>
                    </tbody>
                    <tfoot>
                        <tr>
                            <th><?php echo app('translator')->get('admin.member.id'); ?></th>
                            <th><?php echo app('translator')->get('admin.member.promocode'); ?> </th>
                            <th><?php echo app('translator')->get('admin.member.discount'); ?> </th>
                            <th>Discount Type </th>
                            <th>User Type </th>
                            <th>Starting at</th>
                            <th><?php echo app('translator')->get('admin.member.expiration'); ?></th>
                            <th><?php echo app('translator')->get('admin.member.status'); ?></th>
                            <th>Valid Count</th>
                            <th><?php echo app('translator')->get('admin.member.action'); ?></th>
                        </tr>
                    </tfoot>
                </table>
            </div>
            
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layout.base', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>