mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-05 12:40:52 +08:00
feat: add multiple hooks, pligun schedule support ,add hook:list artisan command
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Services;
|
||||
use App\Models\Server;
|
||||
use App\Models\ServerRoute;
|
||||
use App\Models\User;
|
||||
use App\Services\Plugin\HookManager;
|
||||
use App\Utils\Helper;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
@@ -66,7 +67,7 @@ class ServerService
|
||||
*/
|
||||
public static function getAvailableUsers(array $groupIds)
|
||||
{
|
||||
return User::toBase()
|
||||
$users = User::toBase()
|
||||
->whereIn('group_id', $groupIds)
|
||||
->whereRaw('u + d < transfer_enable')
|
||||
->where(function ($query) {
|
||||
@@ -81,6 +82,7 @@ class ServerService
|
||||
'device_limit'
|
||||
])
|
||||
->get();
|
||||
return HookManager::filter('server.users.get', $users, $groupIds);
|
||||
}
|
||||
|
||||
// 获取路由规则
|
||||
|
||||
Reference in New Issue
Block a user