database
This commit is contained in:
@@ -18,14 +18,12 @@ class HelpWordController extends Frontend
|
||||
$this->error('参数不完整');
|
||||
}
|
||||
$word = new HelpClassify;
|
||||
$word->connect(Config('think-orm.search_library'));
|
||||
$result = $word
|
||||
->with('helpword')
|
||||
$result = Db::connect(config('think-orm.search_library'))->name('help_classify')
|
||||
->where('types', $get['types'])->select()->toArray();
|
||||
$result = convertToCamelCase($result);
|
||||
foreach ($result as $k => $v) {
|
||||
$result[$k]['helpWordList'] = convertToCamelCase($v['helpword']);
|
||||
unset($result[$k]['helpword']);
|
||||
$result[$k]['helpWordList'] = Db::connect(config('think-orm.search_library'))->name('help_word')
|
||||
->where('help_classify_id', $v['helpClassifyId'])->select()->toArray();
|
||||
}
|
||||
$this->success('ok', $result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user