resource setup

This commit is contained in:
2022-09-04 13:57:38 -04:00
parent 8f95e68e61
commit e484c0df98
10 changed files with 66 additions and 9 deletions

View File

@ -7,6 +7,9 @@ use Illuminate\Database\Eloquent\Model;
class Checkout extends Model
{
protected $table = 'checkout';
protected $primaryKey = 'checkout_id';
protected $fillable = [
'bidder_num',
'winnertotal',
@ -25,11 +28,11 @@ class Checkout extends Model
public function bidders()
{
return $this->belongsTo(Bidders::class, 'idbidders');
return $this->belongsTo(Bidders::class, 'bidder_num');
}
public function paymentMethod()
{
return $this->hasMany(PaymentMethods::class, 'payment_method', 'pm_id');
return $this->hasMany(PaymentMethods::class, 'pm_id', 'payment_method');
}
}