create models
This commit is contained in:
31
app/Models/Bidders.php
Normal file
31
app/Models/Bidders.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Bidders extends Model
|
||||
{
|
||||
protected $table = 'bidders';
|
||||
protected $fillable = [
|
||||
'bidder_fname',
|
||||
'bidder_lname',
|
||||
'bidder_addr',
|
||||
'bidder_city',
|
||||
'bidder_state',
|
||||
'bidder_zip',
|
||||
'bidder_phone',
|
||||
'bidder_email',
|
||||
'bidder_assigned_number'
|
||||
];
|
||||
|
||||
public function checkout()
|
||||
{
|
||||
return $this->hasMany('App\Models\Checkout', 'bidder_num', 'idbidders');
|
||||
}
|
||||
|
||||
public function winningBids()
|
||||
{
|
||||
return $this->hasMany('App\Models\WinningBids', 'winning_bidder_num', 'idbidders');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user