mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: add knowledge search
This commit is contained in:
parent
eebdf79b68
commit
e1a523b363
@ -41,11 +41,19 @@ class KnowledgeController extends Controller
|
||||
'data' => $knowledge
|
||||
]);
|
||||
}
|
||||
$knowledges = Knowledge::select(['id', 'category', 'title', 'updated_at'])
|
||||
$builder = Knowledge::select(['id', 'category', 'title', 'updated_at'])
|
||||
->where('language', $request->input('language'))
|
||||
->where('show', 1)
|
||||
->orderBy('sort', 'ASC')
|
||||
->get()
|
||||
->orderBy('sort', 'ASC');
|
||||
$keyword = $request->input('keyword');
|
||||
if ($keyword) {
|
||||
$builder = $builder->where(function ($query) use ($keyword) {
|
||||
$query->where('title', 'LIKE', "%{$keyword}%")
|
||||
->orWhere('body', 'LIKE', "%{$keyword}%");
|
||||
});
|
||||
}
|
||||
|
||||
$knowledges = $builder->get()
|
||||
->groupBy('category');
|
||||
return response([
|
||||
'data' => $knowledges
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5
public/theme/v2board/assets/i18n/en-US.js
vendored
5
public/theme/v2board/assets/i18n/en-US.js
vendored
@ -233,7 +233,7 @@ window.settings.i18n['en-US'] = {
|
||||
'工单历史': 'Ticket History',
|
||||
'已用流量将在 {reset_day} 日后重置': 'Used data will reset after {reset_day} days',
|
||||
'已用流量已在今日重置': 'Data usage has been reset today',
|
||||
'重置已用流量': '重置已用流量',
|
||||
'重置已用流量': 'Reset used data',
|
||||
'查看节点状态': 'View Access Point status',
|
||||
'当前已使用流量达{rate}%': 'Currently used data up to {rate}%',
|
||||
'节点名称': 'Access Point Name',
|
||||
@ -267,5 +267,6 @@ window.settings.i18n['en-US'] = {
|
||||
'按周期': 'By Cycle',
|
||||
'遇到问题': 'I have a problem',
|
||||
'遇到问题可以通过工单与我们沟通': 'If you have any problems, you can contact us via ticket',
|
||||
'按流量': 'Pay As You Go'
|
||||
'按流量': 'Pay As You Go',
|
||||
'搜索文档': '搜索文档'
|
||||
};
|
3
public/theme/v2board/assets/i18n/ja-JP.js
vendored
3
public/theme/v2board/assets/i18n/ja-JP.js
vendored
@ -267,5 +267,6 @@ window.settings.i18n['ja-JP'] = {
|
||||
'按周期': '周期別',
|
||||
'遇到问题': '遇到问题',
|
||||
'遇到问题可以通过工单与我们沟通': '遇到问题可以通过工单与我们沟通',
|
||||
'按流量': '按流量'
|
||||
'按流量': '按流量',
|
||||
'搜索文档': '搜索文档'
|
||||
};
|
3
public/theme/v2board/assets/i18n/ko-KR.js
vendored
3
public/theme/v2board/assets/i18n/ko-KR.js
vendored
@ -267,5 +267,6 @@ window.settings.i18n['ko-KR'] = {
|
||||
'按周期': '按周期',
|
||||
'遇到问题': '遇到问题',
|
||||
'遇到问题可以通过工单与我们沟通': '遇到问题可以通过工单与我们沟通',
|
||||
'按流量': '按流量'
|
||||
'按流量': '按流量',
|
||||
'搜索文档': '搜索文档'
|
||||
};
|
3
public/theme/v2board/assets/i18n/vi-VN.js
vendored
3
public/theme/v2board/assets/i18n/vi-VN.js
vendored
@ -267,5 +267,6 @@ window.settings.i18n['vi-VN'] = {
|
||||
'按周期': 'Chu kỳ',
|
||||
'遇到问题': 'Chúng tôi có một vấn đề',
|
||||
'遇到问题可以通过工单与我们沟通': 'Nếu bạn gặp sự cố, bạn có thể liên lạc với chúng tôi thông qua ',
|
||||
'按流量': '按流量'
|
||||
'按流量': '按流量',
|
||||
'搜索文档': '搜索文档'
|
||||
};
|
3
public/theme/v2board/assets/i18n/zh-CN.js
vendored
3
public/theme/v2board/assets/i18n/zh-CN.js
vendored
@ -267,5 +267,6 @@ window.settings.i18n['zh-CN'] = {
|
||||
'按周期': '按周期',
|
||||
'遇到问题': '遇到问题',
|
||||
'遇到问题可以通过工单与我们沟通': '遇到问题可以通过工单与我们沟通',
|
||||
'按流量': '按流量'
|
||||
'按流量': '按流量',
|
||||
'搜索文档': '搜索文档'
|
||||
};
|
3
public/theme/v2board/assets/i18n/zh-TW.js
vendored
3
public/theme/v2board/assets/i18n/zh-TW.js
vendored
@ -267,5 +267,6 @@ window.settings.i18n['zh-TW'] = {
|
||||
'按周期': '按週期',
|
||||
'遇到问题': '遇到問題',
|
||||
'遇到问题可以通过工单与我们沟通': '遇到問題您可以通過工單與我們溝通',
|
||||
'按流量': '按流量'
|
||||
'按流量': '按流量',
|
||||
'搜索文档': '搜索文档'
|
||||
};
|
2
public/theme/v2board/assets/umi.css
vendored
2
public/theme/v2board/assets/umi.css
vendored
File diff suppressed because one or more lines are too long
2
public/theme/v2board/assets/umi.js
vendored
2
public/theme/v2board/assets/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user