

<?php $__env->startSection('title'); ?>
Sms History 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
<ol class="breadcrumb pull-right">
        <li><a href="<?php echo e(route('home')); ?>"><i class="fa fa-dashboard"></i> Home</a></li>

        <li class="active">Sms History</li>
      </ol>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>


            <div class="container-fluid">
                <!-- /row -->
                <div class="row">
                    <div class="col-sm-12">
                        <div class="white-box">
                            <div class="pull-right">
                                
                                <a href="<?php echo e(route('message.add')); ?>" class="btn  btn-primary">
                                    <i class="fa fa-plus-square"></i>&nbsp; Add new Message
                                </a>
                               
                            </div>

                            <?php if (\Illuminate\Support\Facades\Blade::check('permission', 'manage-messages')): ?>
                            <h3 class="box-title">All Messages</h3>

                            <div class="table-responsive">
                                <table id="myTable" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>Sr #</th>
                                            <th style="width:30%;">Message</th>
                                            <th style="width:40%;">Numbers</th>
                                            <th>Date</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $count =1;?>
                                        <?php $__currentLoopData = $allMessages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $m): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td><?php echo e($count++); ?></td>
                                            <td><?php echo $m->message;?></td>
                                            
                                            <td >
                                                <ol start="1" style="overflow-y:auto;height: 100px;">
                                                <?php $__currentLoopData = $m->smsClients; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <li><?php echo e($c->client->name); ?></li>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </ol>
                                            </td>
                                            <td><?php echo e(date('d-m-Y', strtotime($m->created_at))); ?></td>
                                        </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    </tbody>
                                </table>

                            </div>

                             <?php endif; ?>
                        </div>
                    </div>
                </div>
                <!-- /.row -->
              </div>
            <!-- /.container-fluid -->

<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
<script>
    $(function() {
        $('#myTable').DataTable({
            "paging":true,
            'info':true,
            'pageLength':100
        });
    });
       
    
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/proje372/akram-city.projecterp.net/resources/views/customer/sms-history.blade.php ENDPATH**/ ?>