diff --git a/app/Http/Controllers/Admin/DashboardController.php b/app/Http/Controllers/Admin/DashboardController.php index b220b5f..2d1edf3 100644 --- a/app/Http/Controllers/Admin/DashboardController.php +++ b/app/Http/Controllers/Admin/DashboardController.php @@ -22,148 +22,149 @@ class DashboardController extends Controller * Use : To show the dashboard. */ - public function showDashboard() - { + public function showDashboard() + { - $dailyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("DATE(created_at) as date")) - ->whereBetween('created_at', [now()->subDays(7), now()]) // Fetch data for the last 7 days - ->groupBy(DB::raw("DATE(created_at)")) - ->orderBy(DB::raw("DATE(created_at)")) - ->pluck('count', 'date') - ->toArray(); + $dailyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("DATE(created_at) as date")) + ->whereBetween('created_at', [now()->subDays(7), now()]) // Fetch data for the last 7 days + ->groupBy(DB::raw("DATE(created_at)")) + ->orderBy(DB::raw("DATE(created_at)")) + ->pluck('count', 'date') + ->toArray(); - $start_date = now()->subDays(7)->startOfDay(); - $end_date = now()->endOfDay(); - $formattedDailyData = []; - while ($start_date <= $end_date) { - $formattedDailyData[$start_date->format('Y-m-d')] = $dailyData[$start_date->format('Y-m-d')] ?? 0; - $start_date->addDay(); - } + $start_date = now()->subDays(7)->startOfDay(); + $end_date = now()->endOfDay(); + $formattedDailyData = []; + while ($start_date <= $end_date) { + $formattedDailyData[$start_date->format('Y-m-d')] = $dailyData[$start_date->format('Y-m-d')] ?? 0; + $start_date->addDay(); + } - $defaultData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month")) - ->whereYear('created_at', date('Y')) - ->groupBy(DB::raw("MONTH(created_at)")) - ->orderBy(DB::raw("MONTH(created_at)")) - ->pluck('count', 'month') - ->toArray(); + $defaultData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month")) + ->whereYear('created_at', date('Y')) + ->groupBy(DB::raw("MONTH(created_at)")) + ->orderBy(DB::raw("MONTH(created_at)")) + ->pluck('count', 'month') + ->toArray(); - $months = range(1, 12); - $formattedDefaultData = []; - foreach ($months as $month) { - $formattedDefaultData[$month] = $defaultData[$month] ?? 0; - } + $months = range(1, 12); + $formattedDefaultData = []; + foreach ($months as $month) { + $formattedDefaultData[$month] = $defaultData[$month] ?? 0; + } - $quarterlyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter")) - ->whereYear('created_at', date('Y')) - ->groupBy(DB::raw("QUARTER(created_at)")) - ->orderBy(DB::raw("QUARTER(created_at)")) - ->pluck('count', 'quarter') - ->toArray(); + $quarterlyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter")) + ->whereYear('created_at', date('Y')) + ->groupBy(DB::raw("QUARTER(created_at)")) + ->orderBy(DB::raw("QUARTER(created_at)")) + ->pluck('count', 'quarter') + ->toArray(); - for ($i = 1; $i <= 4; $i++) { - $quarterlyData[$i] = $quarterlyData[$i] ?? 0; - } + for ($i = 1; $i <= 4; $i++) { + $quarterlyData[$i] = $quarterlyData[$i] ?? 0; + } - ksort($quarterlyData); + ksort($quarterlyData); - $yearlyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year")) - ->groupBy(DB::raw("YEAR(created_at)")) - ->pluck('count', 'year') - ->toArray(); + $yearlyData = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year")) + ->groupBy(DB::raw("YEAR(created_at)")) + ->pluck('count', 'year') + ->toArray(); - $dataMonthlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month")) - ->where('principal_type_xid', 3) - ->whereYear('created_at', date('Y')) - ->groupBy(DB::raw("MONTH(created_at)")) - ->orderBy(DB::raw("MONTH(created_at)")) - ->pluck('count', 'month') - ->toArray(); + $dataMonthlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month")) + ->where('principal_type_xid', 3) + ->whereYear('created_at', date('Y')) + ->groupBy(DB::raw("MONTH(created_at)")) + ->orderBy(DB::raw("MONTH(created_at)")) + ->pluck('count', 'month') + ->toArray(); - $dataMonthlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month")) - ->whereYear('created_at', date('Y')) - ->groupBy(DB::raw("MONTH(created_at)")) - ->orderBy(DB::raw("MONTH(created_at)")) - ->pluck('count', 'month') - ->toArray(); + $dataMonthlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month")) + ->whereYear('created_at', date('Y')) + ->groupBy(DB::raw("MONTH(created_at)")) + ->orderBy(DB::raw("MONTH(created_at)")) + ->pluck('count', 'month') + ->toArray(); - $dataMonthlyWithType3 = array_replace(array_fill_keys($months, 0), $dataMonthlyWithType3); - $dataMonthlyWithType4 = array_replace(array_fill_keys($months, 0), $dataMonthlyWithType4); + $dataMonthlyWithType3 = array_replace(array_fill_keys($months, 0), $dataMonthlyWithType3); + $dataMonthlyWithType4 = array_replace(array_fill_keys($months, 0), $dataMonthlyWithType4); - $dataQuarterlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter")) - ->where('principal_type_xid', 3) - ->groupBy(DB::raw("QUARTER(created_at)")) - ->orderBy(DB::raw("QUARTER(created_at)")) - ->pluck('count', 'quarter') - ->toArray(); + $dataQuarterlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter")) + ->where('principal_type_xid', 3) + ->groupBy(DB::raw("QUARTER(created_at)")) + ->orderBy(DB::raw("QUARTER(created_at)")) + ->pluck('count', 'quarter') + ->toArray(); - $dataQuarterlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter")) - ->groupBy(DB::raw("QUARTER(created_at)")) - ->orderBy(DB::raw("QUARTER(created_at)")) - ->pluck('count', 'quarter') - ->toArray(); + $dataQuarterlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("QUARTER(created_at) as quarter")) + ->groupBy(DB::raw("QUARTER(created_at)")) + ->orderBy(DB::raw("QUARTER(created_at)")) + ->pluck('count', 'quarter') + ->toArray(); // Fill missing quarters with zeros $quarters = range(1, 4); $dataQuarterlyWithType3 = array_replace(array_fill_keys($quarters, 0), $dataQuarterlyWithType3); $dataQuarterlyWithType4 = array_replace(array_fill_keys($quarters, 0), $dataQuarterlyWithType4); - $dataYearlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year")) - ->where('principal_type_xid', 3) - ->groupBy(DB::raw("YEAR(created_at)")) - ->pluck('count', 'year') - ->toArray(); + $dataYearlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year")) + ->where('principal_type_xid', 3) + ->groupBy(DB::raw("YEAR(created_at)")) + ->pluck('count', 'year') + ->toArray(); - $dataYearlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year")) - ->groupBy(DB::raw("YEAR(created_at)")) - ->pluck('count', 'year') - ->toArray(); + $dataYearlyWithType4 = Subscriptions::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year")) + ->groupBy(DB::raw("YEAR(created_at)")) + ->pluck('count', 'year') + ->toArray(); - $customerCount = IamPrincipal::where('principal_type_xid', 3)->count(); - $restaurantCount = Subscriptions::where('is_active', 1)->count(); - $formattedDateTime = now()->format('Y-m-d H:i:s'); + $customerCount = IamPrincipal::where('principal_type_xid', 3)->count(); + $restaurantCount = Subscriptions::where('is_active', 1)->count(); + $formattedDateTime = now()->format('Y-m-d H:i:s'); - $recent_transactions = Subscriptions::where('next_payment_date', '>=', $formattedDateTime) - ->with('subscription') - ->orderBy('id', 'desc') - ->get(); + $recent_transactions = Subscriptions::where('next_payment_date', '>=', $formattedDateTime) + ->with('subscription') + ->orderBy('id', 'desc') + ->get(); - $formatted_transactions = $recent_transactions->map(function ($transaction) { - return [ - 'id' => $transaction->id, - 'subscription' => [ - 'first_name' => $transaction->subscription->first_name, - 'last_name' => $transaction->subscription->last_name, - 'id' => $transaction->subscription->id, - ], - 'amount' => $transaction->amount, - 'subscription_id' => $transaction->subscription_id, - 'stripe_customer_id' => $transaction->stripe_customer_id, - 'subscription_status' => $transaction->subscription_status, - 'current_period_start' => Carbon::parse($transaction->current_period_start)->format('m/d/y'), - 'current_period_end' => Carbon::parse($transaction->current_period_end)->format('m/d/y'), - 'next_payment_date' => Carbon::parse($transaction->next_payment_date)->format('m/d/y'), - ]; - })->toArray(); + $formatted_transactions = $recent_transactions->map(function ($transaction) { + return [ + 'id' => $transaction->id, + 'subscription' => $transaction->subscription ? [ + 'first_name' => $transaction->subscription->first_name, + 'last_name' => $transaction->subscription->last_name, + 'id' => $transaction->subscription->id, + ] : null, + 'amount' => $transaction->amount, + 'subscription_id' => $transaction->subscription_id, + 'stripe_customer_id' => $transaction->stripe_customer_id, + 'status' => $transaction->status, + 'current_period_start' => $transaction->current_period_start ? Carbon::parse($transaction->current_period_start)->format('m/d/Y') : null, + 'current_period_end' => $transaction->current_period_end ? Carbon::parse($transaction->current_period_end)->format('m/d/Y') : null, + 'next_payment_date' => $transaction->next_payment_date ? Carbon::parse($transaction->next_payment_date)->format('m/d/Y') : null, + ]; + })->toArray(); - return view('Admin.dashboard', compact( - 'customerCount', - 'restaurantCount', - 'dataMonthlyWithType3', - 'dataMonthlyWithType4', - 'dataQuarterlyWithType3', - 'dataQuarterlyWithType4', - 'dataYearlyWithType3', - 'dataYearlyWithType4', - 'formatted_transactions', - 'dailyData', - 'formattedDailyData', - 'defaultData', - 'formattedDefaultData', - 'quarterlyData', - 'yearlyData' - )); - } + + return view('Admin.dashboard', compact( + 'customerCount', + 'restaurantCount', + 'dataMonthlyWithType3', + 'dataMonthlyWithType4', + 'dataQuarterlyWithType3', + 'dataQuarterlyWithType4', + 'dataYearlyWithType3', + 'dataYearlyWithType4', + 'formatted_transactions', + 'dailyData', + 'formattedDailyData', + 'defaultData', + 'formattedDefaultData', + 'quarterlyData', + 'yearlyData' + )); + } diff --git a/app/Http/Controllers/Admin/ManageCustomerController.php b/app/Http/Controllers/Admin/ManageCustomerController.php index a9c18e6..d3069b4 100644 --- a/app/Http/Controllers/Admin/ManageCustomerController.php +++ b/app/Http/Controllers/Admin/ManageCustomerController.php @@ -30,37 +30,37 @@ use PDF; class ManageCustomerController extends Controller { - /* + /* Created By : Sayali Parab Created at : 28 May 2024 Use : To Get User Page. */ - public function index() - { - try { - $customers = IamPrincipal::with(['isSubscribed', 'state']) - ->where('principal_type_xid', 3) - ->orderBy('created_at', 'desc') - ->get(); + public function index() + { + try { + $customers = IamPrincipal::with(['isSubscribed', 'state']) + ->where('principal_type_xid', 3) + ->orderBy('created_at', 'desc') + ->get(); - $dateTime = now(); - $formattedDateTime = $dateTime->format('Y-m-d H:i:s'); + $dateTime = now(); + $formattedDateTime = $dateTime->format('Y-m-d H:i:s'); - foreach ($customers as $customer) { - $customer->is_subscribed = $customer->isSubscribed->contains(function ($subscription) use ($formattedDateTime) { - return $subscription->subscription_status == 'active' && $subscription->next_payment_date >= $formattedDateTime; - }); - } - - return view('Admin.pages.manage_users.manage_customer.customer', compact('customers')); - } catch (Exception $e) { - Log::error("Manage Voucher Page Not Load " . $e->getMessage()); - return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); + foreach ($customers as $customer) { + $customer->is_subscribed = $customer->isSubscribed->contains(function ($subscription) use ($formattedDateTime) { + return $subscription->status == 'complete' && $subscription->next_payment_date >= $formattedDateTime; + }); } + + return view('Admin.pages.manage_users.manage_customer.customer', compact('customers')); + } catch (Exception $e) { + Log::error("Manage Voucher Page Not Load " . $e->getMessage()); + return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); } + } - /* + /* Created By : Sayali Parab Created at : 28 May 2024 Use : To Get Passport Page. @@ -68,7 +68,7 @@ class ManageCustomerController extends Controller public function view_customer($id) { try { - $customers_data = IamPrincipal::with('state', 'contactMessages','isSubscribed')->findOrFail($id); + $customers_data = IamPrincipal::with('state', 'contactMessages', 'isSubscribed')->findOrFail($id); if ($customers_data->contactMessages->isEmpty()) { Log::info('No contact messages found for customer with ID: ' . $id); } @@ -82,7 +82,7 @@ class ManageCustomerController extends Controller return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); } } - /* + /* Created By : Sayali Parab Created at : 28 May 2024 Use : To Get Customer data. @@ -100,7 +100,7 @@ class ManageCustomerController extends Controller return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); } } - /* + /* Created By : Sayali Parab Created at : 28 May 2024 Use : To Update Customer Form. @@ -213,7 +213,7 @@ class ManageCustomerController extends Controller return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]); } } - /* + /* Created By : Sayali Parab Created at : 28 May 2024 Use : To Get pdf. @@ -234,7 +234,7 @@ class ManageCustomerController extends Controller } } - /* + /* Created By : Sayali Parab Created at : 28 May 2024 Use : To Get Excel. @@ -249,7 +249,7 @@ class ManageCustomerController extends Controller $ids = $request->selected_id; - + if (empty($ids)) { return response()->json(['error' => 'No IDs provided for export.'], 400); } @@ -272,7 +272,7 @@ class ManageCustomerController extends Controller - /* + /* Created By : Sayali Parab Created at : 28 May 2024 Use : To Deleted Data Restore. @@ -322,8 +322,44 @@ class ManageCustomerController extends Controller { try { DB::beginTransaction(); - $deleteCustomer = IamPrincipal::find($id); - // dd($id ); + $stripeSecret = (config('constants.subscription.stripe_secret_key')); + // $stripeSecret = env('STRIPE_SECRET'); + + $stripe = new \Stripe\StripeClient($stripeSecret); + $userId = $id; + + // dd($id,$stripeSecret); + + $getSubscriptionData = Subscriptions::where('iam_principal_xid', $userId)->where('subscription_status', 'active')->first(); + if ($getSubscriptionData) { + $subscriptionId = $getSubscriptionData->subscription_id; + + $cancelledSubscription = $stripe->subscriptions->update( + $subscriptionId, + ['cancel_at_period_end' => true] + ); + + $subscriptionFromDatabase = Subscriptions::where('subscription_id', $subscriptionId)->first(); + $subscriptionFromDatabase->cancelled_at = date('Y-m-d H:i:s', $cancelledSubscription->canceled_at); + + $subscriptionFromDatabase->subscription_status = $cancelledSubscription->status; + $subscriptionFromDatabase->is_cancelled_subscription = 1; + $subscriptionFromDatabase->status = "cancelled"; + + $subscriptionFromDatabase->save(); + + + $getSubscription = $stripe->subscriptions->retrieve($subscriptionFromDatabase->subscription_id, []); + + + $getSubscribeCustomer = $stripe->customers->retrieve( + $subscriptionFromDatabase->stripe_customer_id, + [] + ); + } + + + $deleteCustomer = IamPrincipal::find($userId); $deleteCustomer->delete(); DB::commit(); return response()->json(['sucess' => true, 'status' => 200]); @@ -333,4 +369,55 @@ class ManageCustomerController extends Controller return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]); } } + + public function unsubscibed($id) + { + + try { + DB::beginTransaction(); + $stripeSecret = (config('constants.subscription.stripe_secret_key')); + // $stripeSecret = env('STRIPE_SECRET'); + + $stripe = new \Stripe\StripeClient($stripeSecret); + $userId = $id; + + // dd($id,$stripeSecret); + + $getSubscriptionData = Subscriptions::where('iam_principal_xid', $userId)->where('subscription_status', 'active')->first(); + + $subscriptionId = $getSubscriptionData->subscription_id; + + $cancelledSubscription = $stripe->subscriptions->update( + $subscriptionId, + ['cancel_at_period_end' => true] + ); + + $subscriptionFromDatabase = Subscriptions::where('subscription_id', $subscriptionId)->first(); + $subscriptionFromDatabase->cancelled_at = date('Y-m-d H:i:s', $cancelledSubscription->canceled_at); + + $subscriptionFromDatabase->subscription_status = $cancelledSubscription->status; + $subscriptionFromDatabase->is_cancelled_subscription = 1; + $subscriptionFromDatabase->status = "cancelled"; + + $subscriptionFromDatabase->save(); + + + $getSubscription = $stripe->subscriptions->retrieve($subscriptionFromDatabase->subscription_id, []); + + + $getSubscribeCustomer = $stripe->customers->retrieve( + $subscriptionFromDatabase->stripe_customer_id, + [] + ); + + + DB::commit(); + + return response()->json(['success' => true, 'status' => 200]); + } catch (Exception $e) { + DB::rollBack(); + Log::error("delete_passport function Load Failed " . $e->getMessage()); + return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]); + } + } } diff --git a/app/Models/IamPrincipal.php b/app/Models/IamPrincipal.php index b260667..4b8d986 100644 --- a/app/Models/IamPrincipal.php +++ b/app/Models/IamPrincipal.php @@ -69,7 +69,7 @@ class IamPrincipal extends Authenticatable implements JWTSubject - + public function getJWTIdentifier() { @@ -172,10 +172,10 @@ class IamPrincipal extends Authenticatable implements JWTSubject public function isSubscribed() { - return $this->hasMany(Subscriptions::class, 'iam_principal_xid', 'id')->where('is_cancelled_subscription',0); + return $this->hasMany(Subscriptions::class, 'iam_principal_xid', 'id'); } - - + + } diff --git a/resources/views/Admin/dashboard.blade.php b/resources/views/Admin/dashboard.blade.php index 7a177ac..ae465be 100644 --- a/resources/views/Admin/dashboard.blade.php +++ b/resources/views/Admin/dashboard.blade.php @@ -123,6 +123,7 @@ Name Customer Id Amount + Status payment Details @@ -139,23 +140,24 @@ {{ $loop->iteration }} - {{ $transaction['subscription']['first_name'] }} - {{ $transaction['subscription']['last_name'] }} + {{ $transaction['subscription']['first_name'] ?? 'Deleted' }} + {{ $transaction['subscription']['last_name'] ?? 'User' }} - {{ $transaction['subscription']['id'] }} - $ {{ $transaction['amount'] }} + {{ $transaction['subscription']['id'] ?? 'Deleted User' }} + $ {{ $transaction['amount'] ?? 'Deleted User'}} + {{ $transaction['status'] ?? 'Deleted User'}} View + data-id="{{ $transaction['id'] ?? 'Deleted User'}}" + data-name="{{ $transaction['subscription']['first_name'] ?? 'Deleted User' }}" + data-price="{{ $transaction['amount'] ?? 'Deleted User' }}" + data-subscription-id="{{ $transaction['subscription_id'] ?? 'Deleted User' }}" + data-customer-id="{{ $transaction['stripe_customer_id'] ?? 'Deleted User' }}" + data-subscription-status="{{ $transaction['status'] ?? 'Deleted User'}}" + data-start-date="{{ $transaction['current_period_start'] ?? 'Deleted User'}}" + data-end-date="{{ $transaction['current_period_end'] ?? 'Deleted User'}}" + data-next-date="{{ $transaction['next_payment_date']?? 'Deleted User' }}">View @endforeach diff --git a/resources/views/Admin/header.blade.php b/resources/views/Admin/header.blade.php index 44a0eb6..74e83a8 100644 --- a/resources/views/Admin/header.blade.php +++ b/resources/views/Admin/header.blade.php @@ -7,7 +7,7 @@ - Cheers To Seasons + Cheers To The Seasons diff --git a/resources/views/Admin/pages/auth/login.blade.php b/resources/views/Admin/pages/auth/login.blade.php index 217671f..5cf171b 100644 --- a/resources/views/Admin/pages/auth/login.blade.php +++ b/resources/views/Admin/pages/auth/login.blade.php @@ -1,5 +1,5 @@ @extends('Admin.layouts.app_login') -@section('title', 'Cheers To Season - login') +@section('title', 'Cheers To The Season - login') @section('content')
/* Target the label element with the id 'confirm_password-error' and class 'error' */ diff --git a/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php b/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php index dbe47b6..024903e 100644 --- a/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php +++ b/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php @@ -96,7 +96,7 @@ {{ $querie->customer?->first_name ?? 'N/A' }} {{ $querie->customer?->last_name ?? 'N/A' }} {{ $querie['email'] }} - {{ $querie['created_at']->format('m/d/y') }} + {{ $querie['created_at']->format('m/d/Y') }} @if ($querie->customer) @if ($querie->customer->principal_type_xid == 3) diff --git a/resources/views/Admin/pages/manage_notification/manage_notifications_view.blade.php b/resources/views/Admin/pages/manage_notification/manage_notifications_view.blade.php index 81af447..a0a158e 100644 --- a/resources/views/Admin/pages/manage_notification/manage_notifications_view.blade.php +++ b/resources/views/Admin/pages/manage_notification/manage_notifications_view.blade.php @@ -39,7 +39,7 @@ {{ $notification->type }} {{ $notification->description }} - {{ \Carbon\Carbon::parse($notification->date_added)->format('m/d/y') }} + {{ \Carbon\Carbon::parse($notification->date_added)->format('m/d/Y') }} 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 50e1a2e..d9d19fa 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 @@ -114,13 +114,8 @@ {{ $loop->iteration }} {{ $customer->first_name }} - {{ $customer->last_name }} - - - - {{ $customer->id }} {{ $customer->email_address }} @@ -155,9 +150,18 @@ Edit - + @if ($customer['is_subscribed']) + + Unsubscribe + + @else + + Unsubscribe + + @endif
-