feat: complete flightShow and comments flight

This commit is contained in:
2026-08-17 14:05:14 -07:00
parent 318a79e278
commit ff50fe1a95
3 changed files with 31 additions and 20 deletions
+26 -11
View File
@@ -5,20 +5,27 @@
<h5>بازخوردها</h5>
@forelse($comments as $comment)
@forelse($flight->comments as $comment)
<div class="listing-review-item">
<div class="listing-review-author">
<img
src="{{ $comment->user->file ? asset('storage/'.$comment->user->file->path) : asset('assets/img/account/01.jpg') }}"
src="{{ $comment->user && $comment->user->file
? asset('storage/'.$comment->user->file->path)
: asset('assets/img/account/01.jpg') }}"
alt
>
<div class="listing-review-author-info">
<div>
<h6>
{{ $comment->user->first_name }}
{{ $comment->user->last_name }}
@if($comment->user)
{{ $comment->user->first_name }}
{{ $comment->user->last_name }}
@else
{{ $comment->guest_name }}
@endif
</h6>
<span>
@@ -27,6 +34,7 @@
</span>
</div>
</div>
</div>
<p>{{ $comment->comment }}</p>
@@ -41,6 +49,13 @@
<div class="listing-review-form">
<h4>نظر بدهید</h4>
@error('success')
<div class="alert alert-success">
{{ $message }}
</div>
@enderror
<form action="{{ route('flights.comments', $flight) }}" method="POST">
@csrf
@@ -67,13 +82,13 @@
@endguest
<div class="form-group">
<textarea
name="comment"
class="form-control"
cols="30"
rows="5"
placeholder="نظر خود را بنویسید*"
>{{ old('comment') }}</textarea>
<textarea
name="comment"
class="form-control"
cols="30"
rows="5"
placeholder="نظر خود را بنویسید*"
>{{ old('comment') }}</textarea>
</div>
<button class="theme-btn" type="submit">