

<?php $__env->startSection('content'); ?>
<div class="header bg-gradient-primary pb-8 pt-5 pt-md-8"></div>

<div class="container-fluid mt--7">
    <?php if($errors->any()): ?>
    <div class="alert alert-danger">
        <ul>
        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <li><?php echo e($error); ?></li>
         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>
    </div>
    <br /> 
    <?php endif; ?>

    <?php if(auth()->user()->hasRole('admin')): ?>
        <div class="row">
            <div class="col">
                <div class="card bg-secondary shadow">
                    <div class="card-header border-0">
                        <div class="row align-items-center">
                            <div class="col-12">
                                <h2 class="mb-0">Update a Statistic - <?php echo e($statistic->name); ?></h2>
                                <p class="text-sm mb-0"></p>
                            </div>
                        </div>
                    </div>
                    <div class="card-body">
                        <form method="post" action="<?php echo e(route('statistics.update', $statistic->id)); ?>" enctype="multipart/form-data">
                            <?php echo method_field('PATCH'); ?> 
                            <?php echo csrf_field(); ?>
                            <div class="form-group">
                                <label class="form-control-label" for="name">Name</label>
                                <input type="text" name="name" class="form-control form-control-alternative" id="name" value="<?php echo e($statistic->name); ?>" >
                            </div>
                            <div class="form-group">
                                <label class="form-control-label" for="email">Email</label>
                                <input type="text" name="email" class="form-control form-control-alternative" id="email" value="<?php echo e($statistic->email); ?>">
                            </div> 

                            <div class="form-group">
                                <label class="form-control-label" for="mobile">Mobile</label>
                                <input type="text" name="mobile" class="form-control form-control-alternative" id="mobile" value="<?php echo e($statistic->mobile); ?>">
                            </div> 

                            <div class="form-group">
                                <label class="form-control-label" for="profile">Profile</label>
                                <input type="text" name="profile" class="form-control form-control-alternative" id="profile" value="<?php echo e($statistic->profile); ?>">
                            </div> 

                            <div class="form-group">
                                <label class="form-control-label" for="followers">Followers</label>
                                <input type="text" name="followers" class="form-control form-control-alternative" id="followers" value="<?php echo e($statistic->followers); ?>">
                            </div> 

                            <div class="form-group">
                                <label class="form-control-label" for="following">Following</label>
                                <input type="text" name="following" class="form-control form-control-alternative" id="following" value="<?php echo e($statistic->following); ?>">
                            </div> 

                            <div class="form-group">
                                <label class="form-control-label" for="posts">Posts</label>
                                <input type="text" name="posts" class="form-control form-control-alternative" id="posts" value="<?php echo e($statistic->posts); ?>">
                            </div> 

                            <div class="form-group">
                                <label class="form-control-label" for="engagement_rate">Engagement Rate</label>
                                <input type="text" name="engagement_rate" class="form-control form-control-alternative" id="engagement_rate" value="<?php echo e($statistic->engagement_rate); ?>">
                            </div> 
                            <div class="form-group">
                                <label class="form-control-label" for="campaign_id">Campaign</label>
                                <select class="form-control form-control-alternative js-example-basic-multiple" id="campaign_id" name="campaign_id">
                                    <option value="">Choose a option</option>
                                    <?php $__currentLoopData = $campaigns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $campaign): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($campaign->id); ?>" <?php echo e(($campaign->id == $selectedCampaign) ? 'selected' : ''); ?>><?php echo e($campaign->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>

                            <div class="text-right">
                                <button type="submit" class="btn btn-success mt-4">Update Statistic</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    <?php endif; ?>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/3.10.1/mdb.min.js"
></script>
<script>
    $(document).ready(function() {
        $('.js-example-basic-multiple').select2();
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\umesh\xampp\htdocs\projects\instagram-stat\resources\views/statistics/edit.blade.php ENDPATH**/ ?>