mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
deed547188
commit
175372b9cd
@ -14,7 +14,8 @@ use App\Models\User;
|
||||
class ServerController extends Controller
|
||||
{
|
||||
public function index (Request $request) {
|
||||
$server = Server::get();
|
||||
$server = Server::orderBy('name')
|
||||
->get();
|
||||
for ($i = 0; $i < count($server); $i++) {
|
||||
if (!empty($server[$i]['tags'])) {
|
||||
$server[$i]['tags'] = json_decode($server[$i]['tags']);
|
||||
|
@ -16,7 +16,9 @@ class ClientController extends Controller
|
||||
$user = $request->user;
|
||||
$server = [];
|
||||
if ($user->expired_at > time()) {
|
||||
$servers = Server::where('show', 1)->get();
|
||||
$servers = Server::where('show', 1)
|
||||
->orderBy('name')
|
||||
->get();
|
||||
foreach ($servers as $item) {
|
||||
$groupId = json_decode($item['group_id']);
|
||||
if (in_array($user->group_id, $groupId)) {
|
||||
|
Loading…
Reference in New Issue
Block a user