Implement Commenting Feature in Blog: Enhanced BlogController to handle comments by adding a new storeComment method. Updated blog show view to display approved comments and related posts, improving user engagement and content interaction. Added routes for comment submission, ensuring a complete commenting system.

This commit is contained in:
Ümit Tunç
2025-11-06 16:59:25 -03:00
parent 1fd56cc953
commit 4bdcf66c99
3 changed files with 440 additions and 13 deletions
+1
View File
@@ -74,6 +74,7 @@ Route::get('/', [PageController::class, 'index'])->name('homepage');
// Blog
Route::get('/blog', [BlogController::class, 'index'])->name('blog.index');
Route::get('/blog/{slug}', [BlogController::class, 'show'])->name('blog.show');
Route::post('/blog/{slug}/comment', [BlogController::class, 'storeComment'])->name('blog.comment.store');
// Template Preview (admin panel için)
Route::post('/admin/template-preview', [TemplatePreviewController::class, 'preview'])