add donate until

This commit is contained in:
xiaomlove
2022-04-19 19:18:52 +08:00
parent 7267fb884b
commit 41e3ba55ee
10 changed files with 16 additions and 9 deletions

View File

@@ -434,7 +434,7 @@ class User extends Authenticatable
public function isDonating()
{
if ($this->donoruntil && $this->donoruntil >= Carbon::now()->toDateTimeString()) {
if ($this->donor == 'yes' && $this->donoruntil && $this->donoruntil->gte(Carbon::now())) {
return true;
}
return false;