File Manager Lite
Dir:
/home/codewavebd/public_html/resources/views/admin/blog
Upload
[..]
index.blade.php (2.62 KB)
Edit
Rename
Del
Edit: index.blade.php
@extends('layouts.admin') @section('title', 'Blog Management') @section('page_title', 'Blog Posts') @section('content') <div class="admin-card mb-5"> <div class="d-flex justify-content-between align-items-center mb-4 border-bottom border-secondary pb-3"> <h5 class="mb-0 font-heading text-white"><i class="bi bi-journal-text text-info me-2"></i>Ecosystem Articles</h5> <a href="{{ route('admin.blog.create') }}" class="btn btn-primary-glow"><i class="bi bi-plus-lg me-2"></i>Add Post</a> </div> <div class="table-responsive"> <table class="table table-dark table-hover mb-0"> <thead> <tr class="small text-muted"> <th>Title</th> <th>Author</th> <th>Published At</th> <th>Status</th> <th>Actions</th> </tr> </thead> <tbody> @forelse($posts as $post) <tr class="small border-secondary"> <td class="text-white fw-bold">{{ Str::limit($post->title, 50) }}</td> <td>{{ $post->author_name }}</td> <td class="text-muted">{{ $post->published_at ? $post->published_at->format('Y-m-d H:i') : 'Not Published' }}</td> <td> <span class="badge {{ $post->status === 'published' ? 'bg-success' : 'bg-secondary' }}"> {{ $post->status }} </span> </td> <td> <a href="{{ route('admin.blog.edit', $post->id) }}" class="btn btn-sm btn-outline-info rounded-pill px-3 py-1 me-1">Edit</a> <form action="{{ route('admin.blog.destroy', $post->id) }}" method="POST" class="d-inline" onsubmit="return confirm('Are you sure you want to delete this blog post?')"> @csrf @method('DELETE') <button type="submit" class="btn btn-sm btn-outline-danger rounded-pill px-3 py-1">Delete</button> </form> </td> </tr> @empty <tr> <td colspan="5" class="text-center text-muted py-5">No blog posts found in database.</td> </tr> @endforelse </tbody> </table> </div> <div class="mt-4 d-flex justify-content-center"> {{ $posts->links() }} </div> </div> @endsection
Simpan