CustomRestfirst

This commit is contained in:
sayaliparab
2024-06-17 15:01:05 +05:30
parent 4f42172053
commit 1eae65a7ca
4 changed files with 17 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ class customer_export implements FromCollection , WithHeadings
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'email_address' => $customer->email_address,
'date_of_birth'=> \Carbon\Carbon::parse($customer->date_of_birth)->format('m-d-Y'),
'date_of_birth'=> \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'),
'state_xid' => $customer->state->name ?? '', // Access the state name and handle null
'phone_number' => $customer->phone_number,
];

View File

@@ -42,7 +42,7 @@ class customer_export_selected implements FromCollection, WithHeadings
'first_name' => $customer->first_name,
'last_name' => $customer->last_name,
'email_address' => $customer->email_address,
'date_of_birth' => \Carbon\Carbon::parse($customer->date_of_birth)->format('m-d-Y'), // Format the date
'date_of_birth' => \Carbon\Carbon::parse($customer->date_of_birth)->format('m/d/Y'), // Format the date
'state_xid' => $customer->state->name ?? '', // Access the state name and handle null
'phone_number' => $customer->phone_number,
];

View File

@@ -83,7 +83,10 @@ $currentPage = 'manage-customer';
</th>
<th class="text-start">Sr no</th>
<th class="text-start">Full Name</th>
<th class="text-start">First Name</th>
<th class="text-start">Last Name</th>
<th class="text-start">User ID</th>
<th class="text-start">Email Id</th>
<th class="text-start">Redeemed Restaurant</th>
@@ -106,8 +109,11 @@ $currentPage = 'manage-customer';
</td>
<td class="text-start">{{ $loop->iteration }}</td>
<!-- <td class="text-start">{{ $customer->first_name }}</td> -->
<td class="text-start">{{ $customer->first_name }} {{ $customer->last_name }}
<td class="text-start">{{ $customer->first_name }}
</td>
<td class="text-start">{{ $customer->last_name }}</td>
<td class="text-start">{{ $customer->id }}</td>
<td class="text-start">{{ $customer->email_address }}</td>

View File

@@ -104,6 +104,9 @@
<thead class="text-center">
<tr>
<th class="text-start">Sr no</th>
<th class="text-start">First Name</th>
<th class="text-start">Last Name </th>
<th class="text-start">Restaurant Name</th>
<th class="text-start">Restaurant ID</th>
<th class="text-start">Email Id</th>
@@ -118,6 +121,10 @@
@foreach ($restaurant_users as $restaurant_user)
<tr>
<td class="text-start">{{ $loop->iteration }}</td>
<td class="text-start">{{ $restaurant_user->first_name }}</td>
<td class="text-start">{{ $restaurant_user->last_name }}</td>
<td class="text-start">
@foreach ($restaurant_user->restaurants as $restaurant)
{{ $restaurant->name }}