Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/noud/laravel-seo-google-indexing-api

Laravel SEO Google Search Indexing API
https://github.com/noud/laravel-seo-google-indexing-api

google-indexing-api laravel seo

Last synced: 20 days ago
JSON representation

Laravel SEO Google Search Indexing API

Awesome Lists containing this project

README

        

# Laravel SEO Google Indexing API

Inform Google Search [Indexing API](https://developers.google.com/search/apis/indexing-api/v3/quickstart) about your [Job Posting](https://developers.google.com/search/docs/data-types/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:
```
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);
}
}
```