File Manager Lite
Dir:
/home/codewavebd/public_html/resources/views/admin/blog
Upload
[..]
edit.blade.php (3.93 KB)
Edit
Rename
Del
index.blade.php (2.62 KB)
Edit
Rename
Del
Edit: edit.blade.php
@extends('layouts.admin') @section('title', 'Edit Blog Post') @section('page_title', 'Update Blog Post') @section('content') <div class="admin-card mb-5"> <h5 class="font-heading text-white mb-4 border-bottom border-secondary pb-3">Update Article Specs & Details</h5> <form action="{{ route('admin.blog.update', $blog->id) }}" method="POST" class="admin-form"> @csrf @method('PUT') <div class="row"> <div class="col-md-8 mb-3"> <label class="form-label">Article Title</label> <input type="text" name="title" class="form-control" value="{{ old('title', $blog->title) }}" required> </div> <div class="col-md-4 mb-3"> <label class="form-label">Author Name</label> <input type="text" name="author_name" class="form-control" value="{{ old('author_name', $blog->author_name) }}" required> </div> </div> <div class="mb-3"> <label class="form-label">Short Summary / Description</label> <textarea name="short_description" rows="2" class="form-control" required>{{ old('short_description', $blog->short_description) }}</textarea> </div> <div class="mb-3"> <label class="form-label">Article Body Content (HTML allowed)</label> <textarea name="content" rows="10" class="form-control font-monospace" required>{{ old('content', $blog->content) }}</textarea> </div> <div class="row"> <div class="col-md-4 mb-3"> <label class="form-label">Featured Image Name</label> <input type="text" name="image" class="form-control" value="{{ old('image', $blog->image) }}"> <small class="text-muted">From the <a href="{{ route('admin.media.index') }}" target="_blank" class="text-info text-decoration-none">Media Manager <i class="bi bi-box-arrow-up-right"></i></a></small> </div> <div class="col-md-4 mb-3"> <label class="form-label">Status</label> <select name="status" class="form-select" required> <option value="published" @selected($blog->status === 'published')>Published & Visible</option> <option value="draft" @selected($blog->status === 'draft')>Draft / Hidden</option> </select> </div> <div class="col-md-4 mb-3"> <label class="form-label">Publish Date & Time</label> <input type="datetime-local" name="published_at" class="form-control" value="{{ old('published_at', $blog->published_at ? $blog->published_at->format('Y-m-d\TH:i') : '') }}"> <small class="text-muted">Leave empty to set publication timestamp to now</small> </div> </div> <hr class="border-secondary my-4"> <h5 class="font-heading text-info mb-3">SEO Override Fields (Optional)</h5> <div class="mb-3"> <label class="form-label">SEO Title Override</label> <input type="text" name="seo_title" class="form-control" value="{{ old('seo_title', $blog->seo_title) }}"> </div> <div class="mb-3"> <label class="form-label">SEO Meta Description Override</label> <textarea name="seo_meta_description" rows="2" class="form-control">{{ old('seo_meta_description', $blog->seo_meta_description) }}</textarea> </div> <div class="mb-4"> <label class="form-label">SEO Meta Keywords</label> <input type="text" name="seo_keywords" class="form-control" value="{{ old('seo_keywords', $blog->seo_keywords) }}"> </div> <div class="text-end pt-3 border-top border-secondary"> <a href="{{ route('admin.blog.index') }}" class="btn btn-outline-secondary me-2">Cancel</a> <button type="submit" class="btn btn-primary-glow px-4">Update Post</button> </div> </form> </div> @endsection
Simpan