|
|
@@ -107,7 +107,18 @@ class Customer extends Authenticatable implements CustomerContract
|
|
|
{
|
|
|
return ucfirst($this->first_name).' '.ucfirst($this->last_name);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * Get the isVip.
|
|
|
+ */
|
|
|
+ public function getIsVipAttribute(): string
|
|
|
+ {
|
|
|
+ if (!$this->vip_expire_date) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
+ $expireDate = \Carbon\Carbon::parse($this->vip_expire_date);
|
|
|
+ return !$expireDate->isPast();
|
|
|
+ }
|
|
|
/**
|
|
|
* Get image url for the customer image.
|
|
|
*
|