silent-auction/app/Models/Checkout.php

29 lines
526 B
PHP
Raw Normal View History

2018-12-23 09:00:22 -05:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Checkout extends Model
{
protected $table = 'checkout';
protected $fillable = [
'bidder_num',
'winnertotal',
'payment_method',
'check_number',
'cc_transaction',
'cc_amount'
];
2018-12-23 09:15:59 -05:00
public function bidders()
2018-12-23 09:00:22 -05:00
{
2018-12-23 09:25:00 -05:00
return $this->belongsTo('App\Models\Bidders', 'bidder_num', 'idbidders');
2018-12-23 09:00:22 -05:00
}
public function paymentMethod()
{
return $this->hasMany('App\Models\PaymentMethods', 'payment_method', 'pm_id');
}
}