mirror of
https://github.com/v2board/v2board.git
synced 2025-02-25 14:50:26 +08:00
update
This commit is contained in:
parent
175372b9cd
commit
9066119fb5
@ -14,8 +14,7 @@ use App\Models\User;
|
|||||||
class ServerController extends Controller
|
class ServerController extends Controller
|
||||||
{
|
{
|
||||||
public function index (Request $request) {
|
public function index (Request $request) {
|
||||||
$server = Server::orderBy('name')
|
$server = Server::get();
|
||||||
->get();
|
|
||||||
for ($i = 0; $i < count($server); $i++) {
|
for ($i = 0; $i < count($server); $i++) {
|
||||||
if (!empty($server[$i]['tags'])) {
|
if (!empty($server[$i]['tags'])) {
|
||||||
$server[$i]['tags'] = json_decode($server[$i]['tags']);
|
$server[$i]['tags'] = json_decode($server[$i]['tags']);
|
||||||
|
@ -98,7 +98,9 @@ class UserController extends Controller
|
|||||||
abort(500, '订阅计划不存在');
|
abort(500, '订阅计划不存在');
|
||||||
}
|
}
|
||||||
if ($user->expired_at > time()) {
|
if ($user->expired_at > time()) {
|
||||||
$servers = Server::where('show', 1)->get();
|
$servers = Server::where('show', 1)
|
||||||
|
->orderBy('name')
|
||||||
|
->get();
|
||||||
foreach ($servers as $item) {
|
foreach ($servers as $item) {
|
||||||
$groupId = json_decode($item['group_id']);
|
$groupId = json_decode($item['group_id']);
|
||||||
if (in_array($user->group_id, $groupId)) {
|
if (in_array($user->group_id, $groupId)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user