GoogleKeywordInsightController.php
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* @remark :
* @name :GoogleKeywordInsightController.php
* @author :lyh
* @method :post
* @time :2025/3/25 14:23
*/
namespace App\Http\Controllers\Bside\GoogleKeywordInsight;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\GoogleKeywordInsight\GoogleKeywordInsightLogic;
use App\Models\GoogleKeywordInsight\GoogleKeywordInsightDetail;
/**
* @remark :谷歌洞察数据
* @name :GoogleKeywordInsightController
* @author :lyh
* @method :post
* @time :2025/3/25 14:24
*/
class GoogleKeywordInsightController extends BaseController
{
/**
* @remark :保存数据
* @name :saveKeywordInsight
* @author :lyh
* @method :post
* @time :2025/3/25 14:30
*/
public function getKeywordInsight(GoogleKeywordInsightLogic $logic){
$this->request->validate([
'keyword' => 'required'
],[
'keyword.required' => '关键词不能为空',
]);
$logic->getGoogleInsight();
$detailModel = new GoogleKeywordInsightDetail();
$data = $detailModel->lists(['search'=>$this->param['keyword']],$this->page,$this->row);
$this->response('success',Code::SUCCESS,$data);
}
}