feat: add comments for controller and model and blade for dashboard for user
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
@extends('dashboard.layouts.app')
|
||||
|
||||
@section('title' , 'نظرات من')
|
||||
|
||||
|
||||
@section('account-content')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-9">
|
||||
<div class="user-profile-wrapper">
|
||||
<div class="col-lg-12">
|
||||
<div class="user-profile-card profile-booking">
|
||||
<h4 class="user-profile-card-title">نظرات من ({{ $comments->count() }})</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>شماره</th>
|
||||
<th>نظر</th>
|
||||
<th>مربوط به</th>
|
||||
<th>تاریخ</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($comments as $index => $comment)
|
||||
<tr>
|
||||
<td>{{ $index + 1 }}.</td>
|
||||
<td>
|
||||
<p>{{ $comment->body }}</p>
|
||||
</td>
|
||||
<td>
|
||||
{{ $comment->commentable->title ?? $comment->commentable->flight_number ?? '-' }}
|
||||
</td>
|
||||
<td>{{ $comment->created_at->format('Y/m/d') }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="4" class="text-center">هنوز نظری ثبت نکردی.</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user