mirror of
https://github.com/v2board/v2board.git
synced 2025-06-12 20:47:56 +08:00
add onetime plan
This commit is contained in:
23
app/Services/UserService.php
Normal file
23
app/Services/UserService.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user