value("fields"), true); return compact('fields'); } public static function getGroupDataByType($where, $page = 1, $limit = 10) { $data = self::where([]); if (isset($where['config_name']) && $where['config_name']) { if ($where['config_name']) { if (is_array($where['config_name'])) { $data = self::whereIn('config_name', $where['config_name']); } else { $data = self::where('config_name', $where['config_name']); } } } $data->page((int)$page, (int)$limit); $list = $data->paginate(); $total = $list->total(); $page = $list->render(); return compact('list', 'total', 'page'); } }