Working on credit card

This commit is contained in:
nurmuhammet committed 2024-01-28 19:54:29 +05:00
1 parent 0a631aec80
commit 9c22cce13b
11 files changed
+267 -22

No files matched your search

+18 -1
View File
@@ -47,6 +47,7 @@ class CardOrder extends Model
'passport_two',
'passport_three',
'passport_four',
'paid',
'notes',
'user_id',
];
@@ -101,6 +102,22 @@ protected static function boot()
parent::boot();
static::creating(CardOrderRepo::creating());
static::created(CardOrderRepo::created());
}
/**
* Check if order is paid
*/
public function isPaid(): bool
{
return $this->paid;
}
/**
* Price for order
*/
public function priceAmount(): float
{
return 1;
// return floatval($this->cardType->price);
}
}