From 1eae65a7ca02840fa3616cc2da274f36b590f739 Mon Sep 17 00:00:00 2001 From: sayaliparab Date: Mon, 17 Jun 2024 15:01:05 +0530 Subject: [PATCH] CustomRestfirst --- app/Exports/customer_export.php | 2 +- app/Exports/customer_export_selected.php | 2 +- .../manage_users/manage_customer/customer.blade.php | 10 ++++++++-- .../restaurants_app/restaurants_users.blade.php | 7 +++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/app/Exports/customer_export.php b/app/Exports/customer_export.php index 42ea15e..9f48382 100644 --- a/app/Exports/customer_export.php +++ b/app/Exports/customer_export.php @@ -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, ]; diff --git a/app/Exports/customer_export_selected.php b/app/Exports/customer_export_selected.php index 56aaa48..4643cbc 100644 --- a/app/Exports/customer_export_selected.php +++ b/app/Exports/customer_export_selected.php @@ -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, ]; diff --git a/resources/views/Admin/pages/manage_users/manage_customer/customer.blade.php b/resources/views/Admin/pages/manage_users/manage_customer/customer.blade.php index 4e94c34..66f90d8 100644 --- a/resources/views/Admin/pages/manage_users/manage_customer/customer.blade.php +++ b/resources/views/Admin/pages/manage_users/manage_customer/customer.blade.php @@ -83,7 +83,10 @@ $currentPage = 'manage-customer'; Sr no - Full Name + First Name + + Last Name + User ID Email Id Redeemed Restaurant @@ -106,8 +109,11 @@ $currentPage = 'manage-customer'; {{ $loop->iteration }} - {{ $customer->first_name }} {{ $customer->last_name }} + {{ $customer->first_name }} + + {{ $customer->last_name }} + {{ $customer->id }} {{ $customer->email_address }} diff --git a/resources/views/Admin/pages/manage_users/restaurants_app/restaurants_users.blade.php b/resources/views/Admin/pages/manage_users/restaurants_app/restaurants_users.blade.php index b36e210..747ae00 100644 --- a/resources/views/Admin/pages/manage_users/restaurants_app/restaurants_users.blade.php +++ b/resources/views/Admin/pages/manage_users/restaurants_app/restaurants_users.blade.php @@ -104,6 +104,9 @@ Sr no + First Name + Last Name + Restaurant Name Restaurant ID Email Id @@ -118,6 +121,10 @@ @foreach ($restaurant_users as $restaurant_user) {{ $loop->iteration }} + {{ $restaurant_user->first_name }} + {{ $restaurant_user->last_name }} + + @foreach ($restaurant_user->restaurants as $restaurant) {{ $restaurant->name }}