Files
2025-08-17 16:23:14 +05:45

129 lines
5.2 KiB
PHP

@extends('admin::layouts.master')
@section('title')
Contact Us List
@endsection
@section('breadcrumb')
@php
$breadcrumbData = [
[
'title' => 'Message',
'link' => 'null',
],
[
'title' => 'Dashboard',
'link' => route('dashboard'),
],
[
'title' => 'Contact Us Lists',
'link' => null,
],
];
@endphp
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
@endsection
@section('content')
<!-- banners List Table -->
<div class="card">
<div class="row">
<div class="col-md-6">
<h4 class="card-header">List of Message</h4>
</div>
{{-- <div class="col-md-6">
<div class="flex-column flex-md-row">
<div class="dt-action-buttons text-end pt-3 px-3">
<div class="dt-buttons btn-group flex-wrap">
<a href="{{ route('cms.banners.create') }}"
class="btn btn-secondary create-new btn-primary d-none d-sm-inline-block text-white">
<i class="bx bx-plus me-sm-1"></i>
Add New
</a>
</div>
</div>
</div>
</div> --}}
</div>
<div class="card-datatable table-responsive">
<table class="table">
<thead class="table-light">
<tr>
<th>S.N</th>
<th>Email With Message</th>
<th>Full Name</th>
<th>Address</th>
<th>Created At</th>
<th>Actions</th>
</tr>
</thead>
<tbody class="table-border-bottom-0">
@if ($contactUsCount > 0)
@foreach ($contactUsList ?? [] as $contact_us)
<tr>
<td>
#{{ $loop->iteration }}
</td>
<td>
<div class="d-flex align-items-center me-3">
<div class="card-title mb-0 px-3">
<h6 class="mb-0"> {{ $contact_us->email }}</h6>
<small class="text-muted">{{ Str::limit($contact_us->message, 80) }}</small>
</div>
</div>
</td>
<td>
{{ $contact_us->full_name }}
</td>
<td>
{{ $contact_us->address }}
</td>
<td>
{{ $contact_us->created_at->toFormattedDateString() }}
</td>
<td>
<div class="d-flex">
<form method="POST"
action="{{ route('cms.contactUs.show', ['uuid' => $contact_us->uuid]) }}"
class="dropdown-item">
@csrf
<button type="submit" class="border-0 bg-transparent viewBtn"
style="color:inherit"><i class="bx bx-show-alt me-1"></i></button>
</form>
<form method="POST"
action="{{ route('cms.contactUs.delete', ['uuid' => $contact_us->uuid]) }}"
id="deleteForm_{{ $contact_us->uuid }}" class="dropdown-item">
@csrf
@method('DELETE')
<button type="submit" class="border-0 bg-transparent deleteBtn"
style="color:inherit"><i class="bx bx-trash me-1"></i></button>
</form>
</div>
</td>
</tr>
@endforeach
@else
<tr>
<td colspan="7">No record found.</td>
</tr>
@endif
</tbody>
</table>
</div>
<div class="px-3">
{{-- {{ $contact_us->links('admin::layouts.partials.pagination') }} --}}
</div>
</div>
@endsection
{{-- style --}}
@push('required-styles')
@include('admin::vendor.dataTables.style')
@endpush
{{-- script --}}
@push('required-scripts')
@include('admin::vendor.dataTables.script')
@endpush