add onetime plan

This commit is contained in:
Tokumeikoi
2020-02-28 01:12:55 +08:00
parent 0f9cb9696d
commit e7fd81bf4c
6 changed files with 31 additions and 56 deletions

View File

@ -0,0 +1,23 @@
<?php
namespace App\Services;
use App\Models\User;
class UserService
{
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
public function isAvailable()
{
if ($this->user->transfer_enable && ($this->user->expired_at > time() || $this->user->expired_at == 0)) {
return true;
}
return false;
}
}