

<?php $__env->startSection('content'); ?>
<div class="container py-5">
    <div class="row justify-content-center">
        <div class="col-lg-8">
            <article>
                <h1 class="mb-3 <?php echo e(app()->getLocale() === 'ar' ? 'text-end' : ''); ?>" dir="<?php echo e(app()->getLocale() === 'ar' ? 'rtl' : 'ltr'); ?>"><?php echo e($blog->title); ?></h1>

                <?php if($blog->image): ?>
                    <img src="<?php echo e(asset('storage/' . $blog->image)); ?>" alt="<?php echo e($blog->title); ?>" class="img-fluid rounded mb-4 w-100">
                <?php endif; ?>

                <div class="text-muted mb-4"><?php echo e($blog->published_at?->format('F d, Y')); ?></div>

                <div dir="<?php echo e(app()->getLocale() === 'ar' ? 'rtl' : 'ltr'); ?>" class="<?php echo e(app()->getLocale() === 'ar' ? 'text-end' : ''); ?>">
                    <?php echo $blog->content; ?>

                </div>
            </article>

            <?php if($relatedBlogs->count()): ?>
                <div class="mt-5">
                    <h3 class="mb-3">Related Blogs</h3>
                    <div class="row g-3">
                        <?php $__currentLoopData = $relatedBlogs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $relatedBlog): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-md-4">
                                <div class="card h-100 border-0 shadow-sm">
                                    <?php if($relatedBlog->image): ?>
                                        <img src="<?php echo e(asset('storage/' . $relatedBlog->image)); ?>" class="card-img-top" alt="<?php echo e($relatedBlog->title); ?>">
                                    <?php endif; ?>
                                    <div class="card-body">
                                        <h6><?php echo e($relatedBlog->title); ?></h6>
                                        <a href="<?php echo e(route('blogs.show', $relatedBlog)); ?>" class="btn btn-sm btn-outline-primary mt-2">View</a>
                                    </div>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/onesourceerp/public_html/project/resources/views/blogs/show.blade.php ENDPATH**/ ?>