silent-auction/app/Models/Checkout.php

36 lines
656 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
{
2018-12-23 10:26:26 -05:00
protected $table = 'checkout';
protected $fillable = [
2018-12-23 09:00:22 -05:00
'bidder_num',
'winnertotal',
'payment_method',
'check_number',
'cc_transaction',
2018-12-23 10:17:10 -05:00
'cc_amount',
'created_at',
'updated_at'
2018-12-23 10:26:26 -05:00
];
2018-12-23 10:17:10 -05:00
2018-12-23 10:26:26 -05:00
protected $dates = [
'created_at',
'updated_at'
];
2018-12-23 09:00:22 -05:00
2018-12-23 10:26:26 -05:00
public function bidders()
{
return $this->belongsTo('App\Models\Bidders', 'bidder_num', 'idbidders');
}
2018-12-23 09:00:22 -05:00
2018-12-23 10:26:26 -05:00
public function paymentMethod()
{
return $this->hasMany('App\Models\PaymentMethods', 'payment_method', 'pm_id');
}
2018-12-23 09:00:22 -05:00
}