v2board/app/Services/UserService.php
2020-02-28 01:12:55 +08:00

24 lines
398 B
PHP

<?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;
}
}