convert bidder creation

This commit is contained in:
Russ Long 2018-12-23 10:00:52 -05:00
parent 7499abfef2
commit f622d6b087

View File

@ -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');
}