silent-auction/app/Models/WinningBids.php

33 lines
580 B
PHP
Raw Normal View History

2018-12-23 09:00:22 -05:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class WinningBids extends Model
{
protected $table = 'winning_bids';
protected $fillable = [
'winning_bidder_num',
'winning_cost',
2018-12-23 10:17:10 -05:00
'winning_item_num',
'created_at',
'updated_at'
];
protected $dates = [
'created_at',
'updated_at'
2018-12-23 09:00:22 -05:00
];
public function items()
{
return $this->hasMany('App\Models\Items', 'winning_item_num', 'iditems');
}
public function bidders()
{
return $this->belongsTo('App\Models\Bidders', 'winning_bidder_num', 'idbidders');
}
}