定制 sharpapi/laravel-seo-generate-tags 二次开发

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

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

sharpapi/laravel-seo-generate-tags

Composer 安装命令:

composer require sharpapi/laravel-seo-generate-tags

包简介

AI SEO Meta Tag Generator for Laravel powered by SharpAPI.com

README 文档

README

Latest Version on Packagist Total Downloads

This package provides a Laravel integration for the SharpAPI SEO Meta Tag Generator. It allows you to automatically generate all important META tags for your web content, which is perfect for improving your website's SEO and social media sharing appearance.

Installation

You can install the package via composer:

composer require sharpapi/laravel-seo-generate-tags

Configuration

Publish the config file with:

php artisan vendor:publish --tag="sharpapi-seo-generate-tags"

This is the contents of the published config file:

return [
    'api_key' => env('SHARP_API_KEY'),
    'base_url' => env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),
    'api_job_status_polling_wait' => env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),
    'api_job_status_polling_interval' => env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),
    'api_job_status_use_polling_interval' => env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),
];

Make sure to set your SharpAPI key in your .env file:

SHARP_API_KEY=your-api-key

Usage

use SharpAPI\SeoGenerateTags\SeoGenerateTagsService;

$service = new SeoGenerateTagsService();

// Generate SEO meta tags
$seoTags = $service->generateSeoTags(
    'Your page content or URL here. Make sure to include links and image URLs for better results.',
    'English', // optional language
    'professional' // optional voice tone
);

// $seoTags will contain a JSON string with the generated meta tags

Parameters

  • text (string): The text content or URL to generate meta tags from
  • language (string|null): The language for the meta tags (default: English)
  • voiceTone (string|null): The tone of voice for the meta tag content (e.g., professional, casual)

Response Format

The response is a JSON string containing various meta tags:

{
  "data": {
    "type": "api_job_result",
    "id": "397676a9-599b-4f6d-822a-d9d9f32b3890",
    "attributes": {
      "status": "success",
      "type": "seo_generate_tags",
      "result": {
        "meta_tags": {
          "title": "Las Vegas Grand Prix: A Showstopper Event",
          "author": "",
          "og:url": "",
          "og:type": "article",
          "keywords": "Las Vegas Grand Prix, Max Verstappen, Formula 1, F1, Lewis Hamilton, Fernando Alonso",
          "og:image": "",
          "og:title": "Las Vegas Grand Prix: A Showstopper Event",
          "description": "Max Verstappen and other F1 stars share their thoughts on the Las Vegas Grand Prix.",
          "og:site_name": "",
          "twitter:card": "summary",
          "twitter:image": "",
          "twitter:title": "Las Vegas Grand Prix: A Showstopper Event",
          "og:description": "Max Verstappen and other F1 stars share their thoughts on the Las Vegas Grand Prix.",
          "twitter:creator": "",
          "twitter:description": "Max Verstappen and other F1 stars share their thoughts on the Las Vegas Grand Prix."
        }
      }
    }
  }
}

Features

  • Generates SEO-optimized page titles
  • Creates compelling meta descriptions
  • Provides relevant keywords
  • Includes Open Graph tags for social media sharing
  • Adds Twitter Card meta tags
  • Optimizes content for search engines

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.37k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固