larament/seokit
Composer 安装命令:
composer require larament/seokit
包简介
A complete SEO package for Laravel, covering everything from meta tags to social sharing and structured data.
关键字:
README 文档
README
Technical SEO made easy in Laravel.
SeoKit is a Laravel SEO toolkit for managing meta tags, Open Graph data, Twitter cards, and JSON-LD from one consistent API.
It is designed for applications that need a practical SEO layer without stitching together multiple packages or scattering metadata logic across controllers, models, and views.
Highlights
- Complete SEO coverage for meta tags, Open Graph, Twitter cards, and JSON-LD structured data
- Clean Laravel integration through a facade, Blade directive, install command, and model traits
- Flexible data flow with support for computed SEO data and database-backed SEO records
- Polymorphic model SEO support for managing metadata separately from your domain models
- Built-in caching and sensible defaults to reduce repetitive setup and unnecessary queries
- Designed for modern Laravel applications, with automated test coverage for Laravel 11, 12, and 13
Requirements
- PHP 8.3+
- Laravel 11+
Installation
Install the package with Composer:
composer require larament/seokit
Publish the package assets with the installer command:
php artisan seokit:install
If you prefer to publish assets manually:
php artisan vendor:publish --tag="seokit-config" php artisan vendor:publish --tag="seokit-migrations" php artisan migrate
Quick Start
Set page metadata in your controller:
use Larament\SeoKit\Facades\SeoKit; public function show(Post $post) { SeoKit::title($post->title) ->description($post->excerpt) ->image($post->featured_image) ->canonical(route('posts.show', $post)); return view('posts.show', compact('post')); }
Render the tags in your layout:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> @seoKit <!-- ... --> </head> <body> <!-- ... --> </body> </html>
For model-driven SEO, SeoKit also provides HasSeo and HasSeoData traits.
Documentation
Detailed documentation lives in the GitHub wiki:
The README is intentionally kept short. The wiki should be the source of truth for package guides, examples, and feature-specific documentation.
Development
Run the test suite:
composer test
Run static analysis:
composer analyse
Format the codebase:
composer format
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Contributions are welcome. Please open an issue or submit a pull request if you want to improve the package.
Security
Please review the security policy for reporting vulnerabilities.
Credits
License
SeoKit is open-sourced software licensed under the MIT license.
larament/seokit 适用场景与选型建议
larament/seokit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.69k 次下载、GitHub Stars 达 45, 最近一次更新时间为 2025 年 10 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「seo」 「JSON-LD」 「laravel」 「open-graph」 「meta-tags」 「twitter-cards」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 larament/seokit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 larament/seokit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 larament/seokit 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel wrapper for torann/json-ld
JSON-LD Processor for PHP
Help to manage meta data on Laravel Eloquent model
A tool for scraping URL resources (oEmbed, OpenGraph, Twitter cards, JSON-LD)
Statamic Fine Seo addon
SEO Tools for Laravel and Lumen
统计信息
- 总下载量: 2.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 45
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-03