@@ -486,32 +486,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'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user