mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
24 lines
398 B
PHP
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;
|
|
}
|
|
}
|