<?php $__env->startSection('title', 'topics'); ?>

<?php $__env->startSection('content'); ?>
<h1>topics</h1>
<a href="<?php echo e(route('admin.topics.create')); ?>" class="btn btn-primary mb-3">Create Topic</a>
<table class="table">
    <thead>
        <tr>
            <th>Si.no</th>
            <th>Name</th>
            <th>Image</th>
            <th>Percentage</th>
            <th>Actions</th>
        </tr>
    </thead>
    <tbody>
        <?php $__currentLoopData = $topics; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $topic): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

        
        <tr>
            <td><?php echo e($loop->iteration); ?></td>
            <td><?php echo e($topic->topic_name); ?></td>
            <td>
                <?php if($topic->topic_image): ?>
                    <img src="<?php echo e(asset('storage/' . $topic->topic_image)); ?>" alt="Topic Image" height="75px" width="100px">
                <?php else: ?>
                    No Image
                <?php endif; ?>
            </td>

            <td><?php echo e($topic->topic_Percentage); ?></td>
            <td>
                <a href="<?php echo e(route('admin.topics.edit', $topic->id)); ?>" class="btn btn-sm btn-warning">Edit</a>
                <a href="<?php echo e(route('admin.subtopics.index', $topic->id)); ?>" class="btn btn-sm btn-info">Sub-topics</a>
            </td>
        </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </tbody>
</table>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\Kloudoz_project\WSglobe\online-exam-portal\resources\views/admin/topics.blade.php ENDPATH**/ ?>