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

@@ -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 [