✏️ 编辑:badca471cb8f258c4e2d7c9c56ba310e7e3225cb.php
路径:
/home/boguraj1/.trash/storage/framework/views/badca471cb8f258c4e2d7c9c56ba310e7e3225cb.php
大小:3.55 KB · 修改:2026-07-23 16:13:46 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php $__env->startSection('title', 'Blog Posts'); ?> <?php $__env->startSection('content'); ?> <div class="d-flex justify-content-between mb-4"> <h5 class="fw-bold mb-0">Blog Posts</h5> <a href="<?php echo e(route('admin.blog.create')); ?>" class="btn btn-danger"><i class="bi bi-plus-lg me-1"></i>New Post</a> </div> <div class="card"> <div class="card-body p-0"> <div class="table-responsive"> <table class="table mb-0"> <thead> <tr> <th class="px-4">Image</th> <th>Title</th> <th>Status</th> <th>Published</th> <th>Actions</th> </tr> </thead> <tbody> <?php $__empty_1 = true; $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr> <td class="px-4"> <?php if($post->image): ?> <img src="<?php echo e($post->image_url); ?>" style="width:50px;height:50px;object-fit:cover;border-radius:8px" alt=""> <?php else: ?> <div style="width:50px;height:50px;background:#f0f0f0;border-radius:8px;display:flex;align-items:center;justify-content:center"><i class="bi bi-image text-muted"></i></div> <?php endif; ?> </td> <td class="fw-semibold"><?php echo e(Str::limit($post->title, 50)); ?></td> <td><span class="badge bg-<?php echo e($post->status ? 'success' : 'secondary'); ?>"><?php echo e($post->status ? 'Published' : 'Draft'); ?></span></td> <td class="text-muted" style="font-size:12px"><?php echo e($post->published_at?->format('d M Y') ?? '—'); ?></td> <td> <a href="<?php echo e(route('blog.show', $post->slug)); ?>" target="_blank" class="btn btn-sm btn-outline-secondary me-1"><i class="bi bi-eye"></i></a> <a href="<?php echo e(route('admin.blog.edit', $post)); ?>" class="btn btn-sm btn-outline-primary me-1"><i class="bi bi-pencil"></i></a> <form action="<?php echo e(route('admin.blog.destroy', $post)); ?>" method="POST" class="d-inline" onsubmit="return confirm('Delete post?')"> <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?> <button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button> </form> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <tr><td colspan="5" class="text-center py-5 text-muted">No blog posts yet.</td></tr> <?php endif; ?> </tbody> </table> </div> </div> <?php if($posts->hasPages()): ?> <div class="card-footer bg-white"><?php echo e($posts->links('pagination::bootstrap-5')); ?></div> <?php endif; ?> </div> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\ecommerce\resources\views/admin/blog/index.blade.php ENDPATH**/ ?>
💾 保存
取消
保存为 UTF-8,换行统一为 LF