

<?php $__env->startSection('content'); ?>
<div class="content-area">
    <div class="row row-cards-one">
        <div class="col-md-12 col-lg-6 col-xl-4">
            <div class="mycard bg1">
                <div class="left">
                    <h5 class="title"><?php echo e(__('নিউজ')); ?> </h5>
                    <?php
                        $user = Auth::guard('admin')->user()->role;
                    ?>
                    <?php if($user->name != 'admin' && $user->name != 'moderator'): ?>
                        <span class="number"><?php echo e($author_post); ?></span>
                    <?php else: ?> 
                        <span class="number"><?php echo e($total_post); ?></span>
                    <?php endif; ?>
                    <a href="<?php echo e(route('post.index')); ?>" class="link"><?php echo e(__('সব গুল')); ?></a>
                </div>
                <div class="right d-flex align-self-center">
                    <div class="icon">
                        <i class="fas fa-newspaper"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12 col-lg-6 col-xl-4">
            <div class="mycard bg2">
                <div class="left">
                    <h5 class="title"><?php echo e(__('পেন্ডিং নিউজ')); ?></h5>
                    <?php if($user->name != 'admin' && $user->name != 'moderator'): ?>
                        <span class="number"><?php echo e($author_pending); ?></span>
                    <?php else: ?> 
                        <span class="number"><?php echo e($pending_posts); ?></span>
                    <?php endif; ?>
                    <a href="<?php echo e(route('pending.index')); ?>" class="link"><?php echo e(__('সব গুল')); ?></a>
                </div>
                <div class="right d-flex align-self-center">
                    <div class="icon">
                        <i class="fas fa-hourglass"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12 col-lg-6 col-xl-4">
            <div class="mycard bg3">
                <div class="left">
                    <h5 class="title"><?php echo e(__('ড্রাফট')); ?></h5>
                    <span class="number"><?php echo e($drafts); ?></span>
                    <a href="<?php echo e(route('draft.index')); ?>" class="link"><?php echo e(__('সব গুল')); ?></a>
                </div>
                <div class="right d-flex align-self-center">
                    <div class="icon">
                        <i class="fas fa-pen-square"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12 col-lg-6 col-xl-4">
            <div class="mycard bg4">
                <div class="left">
                    <h5 class="title"><?php echo e(__('সিডিউল নিউজ')); ?></h5>
                    <span class="number"><?php echo e($schedules); ?></span>
                    <a href="<?php echo e(route('schedule.index')); ?>" class="link"><?php echo e(__('সব গুল')); ?></a>
                </div>
                <div class="right d-flex align-self-center">
                    <div class="icon">
                        <i class="fas fa-clock"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12 col-lg-6 col-xl-4">
            <div class="mycard bg5">
                <div class="left">
                    <h5 class="title"><?php echo e(__('আরআরএস ফিড')); ?></h5>
                    <span class="number"><?php echo e($rss); ?></span>
                    <a href="<?php echo e(route('rss.index')); ?>" class="link"><?php echo e(__('সব গুল')); ?></a>
                </div>
                <div class="right d-flex align-self-center">
                    <div class="icon">
                        <i class="fas fa-rss"></i>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-12 col-lg-6 col-xl-4">
            <div class="mycard bg6">
                <div class="left">
                    <h5 class="title"><?php echo e(__('পুলস')); ?></h5>
                    <span class="number"><?php echo e($polls); ?></span>
                    <a href="<?php echo e(route('addPolls.index')); ?>" class="link"><?php echo e(__('সব গুল')); ?></a>
                </div>
                <div class="right d-flex align-self-center">
                    <div class="icon">
                        <i class="fas fa-poll"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <?php if(auth()->guard('admin')->user()->whereId(1)->exists()): ?>
        
    <div class="row row-cards-one">
        <div class="col-md-6 col-xl-3">
            <div class="card c-info-box-area">
                <div class="c-info-box box1">
                    <p><?php echo e(App\Models\Admin::where('id','!=',1)->where( 'created_at', '>', Carbon\Carbon::now()->subDays(30))->get()->count()); ?></p>
                </div>
                <div class="c-info-box-content">
                    <h6 class="title"><?php echo e(__('নতুন রিপোর্টার')); ?></h6>
                    <p class="text"><?php echo e(__('শেষের ৩০ দিনের')); ?></p>
                </div>
            </div>
        </div>
        <div class="col-md-6 col-xl-3">
            <div class="card c-info-box-area">
                <div class="c-info-box box2">
                    <p><?php echo e(App\Models\Admin::where('id','!=',1)->count()); ?></p>
                </div>
                <div class="c-info-box-content">
                    <h6 class="title"><?php echo e(__('সকল রিপোর্টার')); ?></h6>
                    <p class="text"><?php echo e(__('সমস্ত সময়ের জন্য')); ?></p>
                </div>
            </div>
        </div>
        <div class="col-md-6 col-xl-3">
            <div class="card c-info-box-area">
                <div class="c-info-box box3">
                    <p><?php echo e(App\Models\Subscriber::get()->count()); ?></p>
                </div>
                <div class="c-info-box-content">
                    <h6 class="title"><?php echo e(__('সকল সাবস্ক্রাইবার')); ?></h6>
                    <p class="text"><?php echo e(__('সমস্ত সময়ের জন্য')); ?></p>
                </div>
            </div>
        </div>
        <div class="col-md-6 col-xl-3">
            <div class="card c-info-box-area">
                <div class="c-info-box box4">
                     <p><?php echo e(App\Models\Font::get()->count()); ?></p>
                </div>
                <div class="c-info-box-content">
                    <h6 class="title"><?php echo e(__('সমস্ত ফন্টস')); ?></h6>
                    <p class="text"><?php echo e(__('সমস্ত সময়ের জন্য')); ?></p>
                </div>
            </div>
        </div>
    </div>

    <div class="row row-cards-one">
        <div class="col-md-6 col-lg-6 col-xl-6">
            <div class="card">
                <h5 class="card-header"><?php echo e(__('নতুন রিপোর্টার')); ?></h5>
                <div class="card-body">
                    <div class="my-table-responsiv">
                        <table class="table table-hover dt-responsive" cellspacing="0" width="100%">
                            <thead>
                                <tr>
                                    <th><?php echo e(__('ইমেইল')); ?></th>
                                    <th><?php echo e(__('জয়েনের তারিখ')); ?></th>
                                </tr>
                                <?php $__currentLoopData = $userRole; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php $__currentLoopData = $role->users()->orderBy('id','desc')->take(10)->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td><?php echo e($data->email); ?></td>
                                            <td><?php echo e($data->created_at); ?></td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-md-6 col-lg-6 col-xl-6">
            <div class="card">
                <h5 class="card-header"><?php echo e(__('ইমেইল সাবস্ক্রাইবার')); ?></h5>
                <div class="card-body">
                    <div class="my-table-responsiv">
                        <table class="table table-hover dt-responsive" cellspacing="0" width="100%">
                            <thead>
                                <tr>
                                    <th><?php echo e(__("সিরিয়াল")); ?></th>
                                    <th><?php echo e(__("ইমেইল")); ?></th>
                                </tr>
                                <?php $__currentLoopData = $subscribers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($data->id); ?></td>
                                        <td><?php echo e($data->email); ?></td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <?php endif; ?>

</div>

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

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

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/creativedesignbd/news3.creativedesign.com.bd/project/resources/views/admin/dashboard.blade.php ENDPATH**/ ?>