diff --git a/app/Http/Controllers/PagesController.php b/app/Http/Controllers/PagesController.php index c24e41c..e4ab700 100644 --- a/app/Http/Controllers/PagesController.php +++ b/app/Http/Controllers/PagesController.php @@ -46,7 +46,10 @@ class PagesController extends Controller $bidder_phone = $bidder_req->bidderphone; $bidder_email = $bidder_req->bidderemail; $bidder_assigned_number = $bidder_req->biddernum; - $bidder_insert = DB::table('bidders')->insert( + $bidder_insert = Bidders::updateOrCreate( + [ + 'bidder_assigned_number' => $bidder_assigned_number, + ], [ 'bidder_lname' => $bidder_lname , 'bidder_fname' => $bidder_fname , @@ -55,9 +58,9 @@ class PagesController extends Controller 'bidder_state' => $bidder_state , 'bidder_zip' => $bidder_zip , 'bidder_phone' => $bidder_phone , - 'bidder_email' => $bidder_email , - 'bidder_assigned_number' => $bidder_assigned_number + 'bidder_email' => $bidder_email ]); + return redirect('bidders'); }