<?php $user = app('App\Http\Controllers\UsersController'); ?>



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

<?php $__env->startSection('content'); ?>
<div class="container">
    <h1><b>Ban user</b></h1>
    <p class="text-danger">Ban a user from Tadah, temporarily or forever.</p>
    <hr>
    <?php if(session()->has('error')): ?>
        <div class="alert alert-danger">
            <?php echo e(session()->get('error')); ?>

        </div>
    <?php endif; ?>
    <?php if(session()->has('success')): ?>
        <div class="alert alert-success">
            <?php echo e(session()->get('success')); ?>

        </div>
    <?php endif; ?>
    <form method="POST" action="<?php echo e(route('admin.banuser')); ?>" enctype="multipart/form-data">
        <?php echo csrf_field(); ?>

        <div class="form-group">
            <label for="username">Username</label>
            <input type="text" name="username" class="form-control" id="username" placeholder="Username">
        </div>
        <div class="form-group">
            <label for="banreason">Ban reason</label>
            <textarea name="banreason" class="form-control" id="banreason" rows="2"></textarea>
        </div>
        <div class="form-group">
            <label for="unbandate">Banned until</label>
            <div class="input-group">
                <input type="text" name="unbandate" class="form-control" id="unbandate" placeholder="yyyy-mm-dd">
                <div class="input-group-append">
                    <div class="input-group-text">
                        <i class="fas fa-calendar-alt"></i>
                    </div>
                </div>
            </div>
        </div>
        <button type="submit" class="btn btn-danger"><i class="fas fa-user-slash"></i> Ban</button>
    </form>
</div>
<script>
    $('#unbandate').datepicker({
        format: "yyyy-mm-dd"
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\project\tadah\tadah\resources\views/admin/ban.blade.php ENDPATH**/ ?>