Current File : /home/tradevaly/public_html/storage/framework/views/8d4d4a496fea643ce7c6291c34d60d7999970978.php |
<?php $__env->startPush('title'); ?> Categories <?php $__env->stopPush(); ?>
<?php $__env->startSection('css'); ?>
<!-- DataTables -->
<link href="<?php echo e(asset('/assets/libs/datatables/datatables.min.css')); ?>" rel="stylesheet" type="text/css" />
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php $__env->startComponent('components.breadcrumb'); ?>
<?php $__env->slot('li_1'); ?> Dashboards <?php $__env->endSlot(); ?>
<?php $__env->slot('title'); ?> Categories <?php $__env->endSlot(); ?>
<?php echo $__env->renderComponent(); ?>
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row mb-2">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<div class="text-sm-end">
<a href="<?php echo e(url('b2b/category/add')); ?>"
class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2"><i
class="mdi mdi-plus me-1"></i> Add New Category</a>
</div>
</div><!-- end col-->
</div>
<div class="table-responsive">
<table id="datatable-buttons" class="table table-bordered dt-responsive nowrap w-100">
<thead class="table-light text-center">
<tr>
<th class="text-center">#</th>
<th><?php echo e(translate('Image')); ?></th>
<th><?php echo e(translate('Name')); ?></th>
<th><?php echo e(translate('Parent id')); ?></th>
<th><?php echo e(translate('Sub Categories')); ?></th>
<th><?php echo e(translate('Status')); ?></th>
<th><?php echo e(translate('Actions')); ?></th>
</tr>
</thead>
<tbody class="text-center">
<tbody class="text-center">
<?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($loop->index + 1); ?></td>
<td>
<img style="height: 30px; width:30px; border-radius:10%;" src="<?php echo e(asset('storage/images/admin/category/'.$category->image)); ?>" alt="">
</td>
<td><?php echo e($category->name); ?></td>
<td>
<?php if($category->parent_id != 0): ?>
<?php echo e($category->parent->name); ?>
<?php else: ?>
Main Category
<?php endif; ?>
</td>
<td>
<?php
$total_subcategry = App\Models\Category::latest()->where('parent_id', $category->id)->count();
?>
<?php if($total_subcategry > 0): ?>
<a class="badge bg-warning" href="<?php echo e(route('admin.category.subcat', $category->id)); ?>">View Subcategories</a>
<?php else: ?>
No Sub Category
<?php endif; ?>
</td>
<td>
<a href="<?php echo e(route('admin.category.updateCategoryStatus',$category->id)); ?>" class="btn btn-info " title="Turn On" style="color: #fff">
<i class="fas fa-toggle-<?php echo e($category->status ? 'on':'off'); ?>"></i>
</a>
</td>
<td>
<a href="<?php echo e(route('admin.category.add',$category->id)); ?>" class="text-success" title="Add Subcategory" style="color: #fff">
<i class="fa fa-plus fa-lg"></i>
</a> <a href="<?php echo e(route('admin.category.edit',$category->id)); ?>" class="text-info" title="Edit" style="color: #fff">
<i class="fas fa-pencil-alt fa-lg"></i>
</a>
<a onclick="return confirm(\'Are you sure? If yes then all product will be deleted with this category.\')" href="<?php echo e(route('admin.category.delete',$category->id)); ?>" class="text-danger confirmDelete"><i class="fas fa-trash fa-lg"></i></a>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- end row -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<!-- Required datatable js -->
<script src="<?php echo e(asset('/assets/libs/datatables/datatables.min.js')); ?>"></script>
<script src="<?php echo e(asset('/assets/libs/jszip/jszip.min.js')); ?>"></script>
<script src="<?php echo e(asset('/assets/libs/pdfmake/pdfmake.min.js')); ?>"></script>
<!-- Datatable init js -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend.ayaan.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradevaly/public_html/resources/views/backend/pages/category/index.blade.php ENDPATH**/ ?>