From 2694f0cd8a11591c9216d18cd9109fe0cb955f3c Mon Sep 17 00:00:00 2001 From: Bahar Date: Mon, 17 Aug 2026 14:01:13 +0330 Subject: [PATCH] feat:complete comment section --- app/Http/Controllers/CommentController.php | 5 ++--- app/Http/Requests/CommentPostRequest.php | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index eae99cb..ccf8fb2 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -1,13 +1,12 @@ auth()->guest() ? $data['guest_name'] : null, 'guest_email'=> auth()->guest() ? $data['guest_email'] : null, 'comment' => $data['comment'], - 'status' => CommentStatus::PENDING, + 'status' => CommentStatus::APPROVED, ]); return back()->with('success', 'نظر شما ثبت شد.'); diff --git a/app/Http/Requests/CommentPostRequest.php b/app/Http/Requests/CommentPostRequest.php index 8b6ac44..3924a4a 100644 --- a/app/Http/Requests/CommentPostRequest.php +++ b/app/Http/Requests/CommentPostRequest.php @@ -25,11 +25,6 @@ class CommentPostRequest extends FormRequest $isGuest = ! auth()->check(); return [ - 'rating' => [ - 'required', - 'integer', - 'between:1,5', - ], 'comment' => [ 'required',