added rebid and auto login while creating account

This commit is contained in:
Ritikesh yadav
2024-05-13 14:00:37 +05:30
parent 12fe516f67
commit aa8575e7ce
7 changed files with 15 additions and 8 deletions

View File

@@ -1039,7 +1039,7 @@ class AuthController extends Controller
public function enteredOtp(Request $request)
{
// dd(Session::get('user-registration'));
// dd($request->all(),Session::get('user-registration'));
$validator = Validator::make($request->post(), [
'otp' => 'required|min:4|max:4',
// 'contact_number' => 'required|exists:users,contact_number|min:10|max:10'
@@ -1078,8 +1078,8 @@ class AuthController extends Controller
'password' => $userDetails['password'],
]);
Mail::to($userDetails['email'])->send(new RegisteredMail());
Session::forget('user-registration');
Auth::guard('users')->login($userCreated);
//sending notifications
$name = $userDetails['name'];
$notify['message'] = "$name has registered to Jericho Alternatives Website and App!";
@@ -1088,6 +1088,7 @@ class AuthController extends Controller
foreach ($users as $data) {
$data->notify(new UserAdmin($notify, $type));
}
Session::forget('user-registration');
// Auth::guard('users')->login($userCreated);
return response()->json(['status' => 200, 'message' => 'OTP has been matched and User has been created!'], 200);
@@ -1095,6 +1096,7 @@ class AuthController extends Controller
}
$checkOTP = User::where(['contact_number' => $request->contact_number, 'otp' => $request->otp])->first();
if ($checkOTP) {
if (!$checkOTP) {
return response()->json(['status' => 400, 'message' => 'OTP Did Not Matched!'], 400);

View File

@@ -309,6 +309,7 @@ class AlternativeInvestmentFundController extends Controller
public function ventureCapitalData($slug)
{
// dd(AlternativeInvestmentFund::where('slug', $slug)->first());
try {
return (new VentureCapitalFundResource(AlternativeInvestmentFund::where('slug', $slug)->first()))
->response()

View File

@@ -653,6 +653,7 @@ class DashboardController extends Controller
'current_or_latest_nav' => $request->current_or_latest_nav,
'no_of_units_held' => $request->no_of_units_held,
'no_of_units_you_wish_to_sell' => $request->no_of_units_you_wish_to_sell,
'og_no_of_units_wish_to_sell' => $request->no_of_units_you_wish_to_sell,
'expected_sale_per_unit' => $request->expected_sale_per_unit,
'latest_valuation_date' => $request->latest_valuation_date,
'listing_status' => 'Hide',
@@ -707,6 +708,8 @@ class DashboardController extends Controller
'original_amount_invested' => $request->original_amount_invested,
'current_market_value_of_the_property' => $request->current_market_value_of_the_property,
'expected_selling_price' => $request->expected_selling_price,
'og_current_market_value_of_the_property' => $request->current_market_value_of_the_property,
'og_expected_selling_price' => $request->expected_selling_price,
'latest_valuation_date' => $request->latest_valuation_date,
'listing_status' => 'Hide',
'status' => 'Pending'

View File

@@ -222,7 +222,7 @@ class MarketPlaceController extends Controller
{
$interestedStatus = false;
if (auth()->guard('users')->check()) {
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->first();
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->where('status', '!=', 'Sold')->first();
}
return ['interested-status-data' => $interestedStatus];
}
@@ -231,7 +231,7 @@ class MarketPlaceController extends Controller
{
$interestedStatus = false;
if (auth()->guard('users')->check()) {
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->exists();
$interestedStatus = MarketplaceBuyerForm::where(['users_id' => auth()->guard('users')->user()->id, 'table' => $table, 'associated_id' => $offering->id])->where('status', '!=', 'Sold')->exists();
}
$totalInterestedBuyers = MarketplaceBuyerForm::where(['table' => $table, 'associated_id' => $offering->id])->count();
return [