resource setup
This commit is contained in:
@ -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');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user