<?php

namespace app\index\controller;

use think\exception\ValidateException;
use app\model\MemberCategory;

class MembercategoryController extends Base
{

    public function list()
    {
        $member_category = MemberCategory::where('status', 1)
            ->order('id asc')
            ->field('id,name')
            ->select()
            ->toArray();

        $data = $member_category;
        return $this->json(['data' => $data]);
    }
}
