I extendByHourse method
This commit is contained in:
parent
2ce9893e81
commit
2f19523dcf
|
|
@ -24,7 +24,7 @@ trait WillExpire
|
||||||
if ($this->expires_at === null && !$expire_if_null) {
|
if ($this->expires_at === null && !$expire_if_null) {
|
||||||
// Do not add expiration if it does not expire
|
// Do not add expiration if it does not expire
|
||||||
return;
|
return;
|
||||||
} elseif ($this->expires_at->isPast()) {
|
} elseif ($this->expires_at === null || $this->expires_at->isPast()) {
|
||||||
$this->expires_at = now()->addHours($hours);
|
$this->expires_at = now()->addHours($hours);
|
||||||
} else {
|
} else {
|
||||||
$this->expires_at = $this->expires_at->addHours($hours);
|
$this->expires_at = $this->expires_at->addHours($hours);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue