noud/laravel-seo-google-indexing-api
Composer 安装命令:
composer require noud/laravel-seo-google-indexing-api
包简介
Laravel SEO Google Search Indexing API
README 文档
README
Inform Google Search Indexing API about your Job Posting URLs.
Requirements
- PHP 7.2+
- Laravel 5.6+
Installation
Install the package by running this command in your terminal/cmd:
composer require noud/laravel-seo-google-indexing-api
Configuration
Add these settings to your .env.
GOOGLE_SERVICE_ENABLED=true
GOOGLE_SERVICE_ACCOUNT_JSON_LOCATION="/var/www/seo/config/google/google-service-account.json"
Usage
Here is a usage example:
<?php
namespace App\Http\Controllers;
use App\Models\JobPosting;
use GoogleIndexing\Services\IndexingService;
class GoogleIndexingController extends Controller
{
private $indexingService;
public function __construct(IndexingService $indexingService)
{
$this->indexingService = $indexingService;
}
public function updateURL(JobPosting $jobPosting)
{
$this->indexingService->update($jobPosting->url);
}
public function removeURL(JobPosting $jobPosting)
{
$this->indexingService->remove($jobPosting->url);
}
public function statusURL(JobPosting $jobPosting)
{
$this->indexingService->status($jobPosting->url);
}
}
统计信息
- 总下载量: 7.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-01-11