|
...
|
...
|
@@ -65,6 +65,13 @@ class KeywordController extends BaseController |
|
|
|
return $this->success(Arr::twoKeepKeys($data, ['id', 'project_id', 'title', 'seo_title', 'seo_keywords', 'seo_description', 'created_at', 'route', 'url']));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存
|
|
|
|
* @name :save
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/28 14:24
|
|
|
|
*/
|
|
|
|
public function save(KeywordRequest $request, KeywordLogic $logic)
|
|
|
|
{
|
|
|
|
$request->validated();
|
|
...
|
...
|
@@ -73,15 +80,33 @@ class KeywordController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :批量添加
|
|
|
|
* @name :batchAdd
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/28 14:25
|
|
|
|
*/
|
|
|
|
public function batchAdd(KeywordLogic $logic){
|
|
|
|
$this->request->validate([
|
|
|
|
'title'=>['required','array']
|
|
|
|
],[
|
|
|
|
'title.required' => 'title不能为空',
|
|
|
|
'title.array' => 'title为数组'
|
|
|
|
]);
|
|
|
|
$data = $logic->batchAdd();
|
|
|
|
$this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :删除数据
|
|
|
|
* @name :delete
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/23 17:44
|
|
|
|
*/
|
|
|
|
public function delete(Request $request, KeywordLogic $logic)
|
|
|
|
public function delete(KeywordLogic $logic)
|
|
|
|
{
|
|
|
|
$request->validate([
|
|
|
|
$this->request->validate([
|
|
|
|
'ids'=>['required', new Ids()]
|
|
|
|
],[
|
|
|
|
'ids.required' => 'ID不能为空'
|
...
|
...
|
|