定制 ymigval/laravel-indexnow 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ymigval/laravel-indexnow

Composer 安装命令:

composer require ymigval/laravel-indexnow

包简介

Laravel Service Library for notifying search engines about the latest content changes on their URLs using IndexNow.

README 文档

README

A Laravel package that simplifies the integration with IndexNow API to notify search engines about URL changes in real-time.

🎯 Overview

This package provides an elegant way to notify search engines about changes to your website's URLs using the IndexNow API. Perfect for keeping search engines updated when content is created, modified, or deleted on your website.

🔍 What is IndexNow?

IndexNow is an open protocol that enables websites to instantly inform search engines about latest content changes. This ensures faster indexing and more up-to-date search results.

Features

  • 🚀 Instant search engine notification
  • 📦 Simple integration with Laravel
  • 🔄 Support for single and bulk URL submissions
  • 🛡️ Built-in spam prevention
  • 📝 Detailed logging system
  • ⚙️ Configurable environment settings

Requirements

  • PHP 8.0 or higher
  • Laravel 8.0 or higher

⚙️ Installation

Install the package via Composer:

composer require ymigval/laravel-indexnow

🛠️ Configuration

  1. Publish the configuration file:
php artisan vendor:publish --tag="indexnow"
  1. Generate an IndexNow API key from one of these services:

  2. Add your API key to the .env file:

INDEXNOW_API_KEY=your_api_key_here

Key File Verification

Place your API key file at your domain's root with a .txt extension:

https://www.example.com/4cea016a4ddb408592569456a9c4896b.txt

Helpful commands:

# View your IndexNow API key
php artisan indexnow:apikey

# If the route doesn't work, clear and cache routes
php artisan route:clear
php artisan route:cache

# Check IndexNow package status and configuration
php artisan indexnow:status

The indexnow:status command will help you verify:

  • API Key configuration and validity
  • Key file accessibility
  • Configuration file status
  • Search engine settings
  • Submissions status
  • Logging configuration
  • Spam protection status
  • Route registration
  • Overall package status and provide recommendations

📋 Usage

Single URL Submission

use Ymigval\LaravelIndexnow\Facade\IndexNow;

IndexNow::submit('https://www.example.com/my-page');

Multiple URLs Submission

use Ymigval\LaravelIndexnow\Facade\IndexNow;

// Using array
IndexNow::submit([
    'https://www.example.com/page-1',
    'https://www.example.com/page-2',
    'https://www.example.com/page-3',
]);

// Or using method chaining
IndexNow::setUrl('https://www.example.com/page-1')
        ->setUrl('https://www.example.com/page-2')
        ->setUrl('https://www.example.com/page-3')
        ->submit();

🛡️ Security

Spam Prevention

The package includes built-in spam protection that temporarily blocks requests for 24 hours when suspicious activity is detected.

📊 Logging

View action logs using the Artisan command:

php artisan indexnow:logs

📝 Changelog

See CHANGELOG for all notable changes.

📄 License

This package is open-source software licensed under the MIT License.

🤝 Contributing

Contributions are welcome! Please see the contributing guide for details.

⭐ Support

If you find this package helpful, please consider giving it a star on GitHub!

ymigval/laravel-indexnow 适用场景与选型建议

ymigval/laravel-indexnow 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.75k 次下载、GitHub Stars 达 33, 最近一次更新时间为 2023 年 08 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「search」 「seo」 「bing」 「laravel」 「yandex」 「search engine」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 ymigval/laravel-indexnow 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ymigval/laravel-indexnow 我们能提供哪些服务?
定制开发 / 二次开发

基于 ymigval/laravel-indexnow 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 14.75k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 33
  • 点击次数: 27
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 33
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-26