Download the PHP package elfeffe/laravel-google-indexing without Composer
On this page you can find all versions of the php package elfeffe/laravel-google-indexing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elfeffe/laravel-google-indexing
More information about elfeffe/laravel-google-indexing
Files in elfeffe/laravel-google-indexing
Package laravel-google-indexing
Short Description Index Laravel website in Google via Indexing API
License MIT
Homepage https://github.com/elfeffe/laravel-google-indexing
Informations about the package laravel-google-indexing
elfeffe/laravel-google-indexing
Submit URLs to Google's Indexing API from Laravel and track successful submissions in google_indexing_records.
This package is useful for sites that are eligible for the Google Indexing API and want:
- direct URL update/delete requests
- helper methods for quota-aware indexing
- a reusable
GoogleIndexabletrait for models - persistent records of successful submissions
Requirements
- PHP 8.4+
- Laravel 12 or 13
- a Google service account configured for the Indexing API
Important note
Google only allows the Indexing API for specific content types, such as job posting and livestream pages. Check the official docs before using it broadly:
Installation
Publish the config:
Publish the migration:
The package now reuses an existing published create_google_indexing_records_table migration if one is already present, so republishing does not create duplicate migration files.
Configuration
By default the package expects the Google auth JSON at:
You can override it in config/laravel-google-indexing.php:
You may also pass a JSON string or array directly when instantiating the service.
Basic usage
Facade
Direct service usage
Custom auth config
Model indexing
If a model exposes a canonical URL, you can use the GoogleIndexable trait.
Then:
Helper usage
The helper wraps the service with daily quota tracking based on successful submissions stored in google_indexing_records.
Quota helpers
Using the trait:
Stored records
Successful requests are stored in google_indexing_records with:
urlstatussent_atresponse_dataerror_message- optional morph relation via
indexable_type/indexable_id
This lets you avoid unnecessary resubmissions and track recent indexing activity.
Exceptions
Quota errors throw:
You should catch it if you are bulk processing URLs.
Credits
License
MIT. See LICENSE.md.
All versions of laravel-google-indexing with dependencies
google/apiclient Version ^2.19.0
illuminate/support Version ^12.0 || ^13.0
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0