From 64bfa71b78704fbd0524efa90c5a4dd0b94ddfc3 Mon Sep 17 00:00:00 2001 From: cj201199 Date: Wed, 15 May 2024 16:20:28 +0530 Subject: [PATCH] bugs solving --- .../Frontend/DashboardController.php | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index 85690fe..d45b612 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -464,32 +464,34 @@ class DashboardController extends Controller $data = ''; } - $userKyc = UserKyc::where('users_id', auth()->guard('users')->user()->id)->exists(); + $userKyc = UserKyc::where('users_id',auth()->guard('users')->user()->id)->exists(); $userData = array(); + // $user; if ($userKyc) { $marketPlaceSellerForm = MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->first(); - $user = ModelsUser::find(auth()->guard('users')->user()->id); - // $userData = (object)[ - // 'encrypted_custom_id' => $custom_id, - // 'name' => $marketPlaceSellerForm->name ?? $user->name, - // 'city' => $marketPlaceSellerForm->city ?? null, - // 'country' => $marketPlaceSellerForm->country ?? null, - // 'postal_code' => $marketPlaceSellerForm->postal_code ?? null, - // 'contact_number' => $marketPlaceSellerForm->contact_number ?? $user->contact_number, - // 'email' => $marketPlaceSellerForm->email ?? $user->email, - // 'declaration' => $marketPlaceSellerForm->declaration ?? null, - // ]; + // dd($marketPlaceSellerForm); + $user = ModelsUser::where('id',auth()->guard('users')->user()->id)->first(); + $userData = (object)[ + 'encrypted_custom_id' => $custom_id, + 'name' => $user->name ?? $user->name, + 'city' => $marketPlaceSellerForm->city ?? null, + 'country' => $marketPlaceSellerForm->country ?? null, + 'postal_code' => $marketPlaceSellerForm->postal_code ?? null, + 'contact_number' => $user->contact_number ?? $user->contact_number, + 'email' => $user->email ?? $user->email, + 'declaration' => $user->declaration ?? null, + ]; } - $userData = (object)[ - 'encrypted_custom_id' => $custom_id, - 'name' => $userKyc ? $marketPlaceSellerForm->name ?? $user->name : null, - 'city' => $userKyc ? $marketPlaceSellerForm->city ?? null : null, - 'country' => $userKyc ? $marketPlaceSellerForm->country ?? null : null, - 'postal_code' => $userKyc ? $marketPlaceSellerForm->postal_code ?? null : null, - 'contact_number' => $userKyc ? $marketPlaceSellerForm->contact_number ?? $user->contact_number : null, - 'email' => $userKyc ? $marketPlaceSellerForm->email ?? $user->email : null, - 'declaration' => $userKyc ? $marketPlaceSellerForm->declaration ?? null : null, - ]; + // $userData = (object)[ + // 'encrypted_custom_id' => $custom_id, + // 'name' => $userKyc ? $marketPlaceSellerForm->name ?? $user->name : null, + // 'city' => $userKyc ? $marketPlaceSellerForm->city ?? null : null, + // 'country' => $userKyc ? $marketPlaceSellerForm->country ?? null : null, + // 'postal_code' => $userKyc ? $marketPlaceSellerForm->postal_code ?? null : null, + // 'contact_number' => $userKyc ? $marketPlaceSellerForm->contact_number ?? $user->contact_number : null, + // 'email' => $userKyc ? $marketPlaceSellerForm->email ?? $user->email : null, + // 'declaration' => $userKyc ? $marketPlaceSellerForm->declaration ?? null : null, + // ]; return view('Frontend.Pages.profile.market-list.sale-form', compact('data', 'userData')); }