comments()->create([ 'user_id' => auth()->id(), 'body' => $request->validated('body'), 'status' => 1, ]); return back()->with('success', 'نظر شما با موفقیت ثبت شد.'); } //ثبت نظر برای پرواز public function storeFlight(CommentStoreRequest $request, Flight $flight) { $flight->comments()->create([ 'user_id' => auth()->id(), 'body' => $request->validated('body'), 'status' => 1, ]); return back()->with('success', 'نظر شما با موفقیت ثبت شد.'); } public function myComments() { $comments = auth()->user()->comments() ->with('commentable') ->latest() ->paginate(10); return view('account.comments', compact('comments')); } }