Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Seokit Laravel Package

larament/seokit

SeoKit is a Laravel toolkit for managing meta tags, Open Graph, Twitter cards, and JSON-LD through one clean API, with model traits, caching, and polymorphic SEO records.

View on GitHub
Deep Wiki
Context7

Larament SeoKit is a Laravel SEO toolkit that centralizes meta tags, Open Graph, Twitter cards, and JSON-LD structured data behind one consistent API. It gives modern Laravel applications a practical SEO layer without scattering metadata logic across controllers, models, and views.

  • Fluent facade and Blade directive for page metadata
  • Polymorphic model traits for database-backed SEO records
  • Built-in caching and sensible defaults
  • Installer command with publishable config and migrations
  • Tested on Laravel 11, 12, and 13 with PHP 8.3+
Frequently asked questions about Seokit
What is larament/seokit used for in Laravel?
SeoKit is a SEO toolkit for Laravel that manages meta tags, Open Graph data, Twitter cards, and JSON-LD structured data from one API. It is designed to keep metadata logic out of controllers, models, and views where possible. It supports controller-driven, model-backed, and database-backed SEO data flows.
How do I install SeoKit in a Laravel application?
Install it with composer require larament/seokit, then run php artisan seokit:install to publish assets. You can also publish the config and migrations manually with vendor:publish tags and run php artisan migrate. The package publishes a single seo_data migration for database-backed SEO.
What Laravel and PHP versions does SeoKit require?
SeoKit requires PHP 8.3 or higher and Laravel 11 or higher. Its automated tests cover Laravel 11, 12, and 13. Applications on older Laravel or PHP versions need an upgrade before adopting it.
How do I set page meta tags from a controller with SeoKit?
Use the SeoKit facade in your controller and chain methods such as title, description, image, and canonical. For example, SeoKit::title($post->title)->description($post->excerpt)->image($post->featured_image)->canonical(route(...)). This controller-driven flow is the quickest way to start using the package.
Can SeoKit attach SEO metadata to Eloquent models?
Yes, SeoKit provides a HasSeo model trait and polymorphic SEO support. Metadata is stored separately from your domain models through the seo_data table, so you can manage per-model SEO without adding columns to existing tables. This is useful for content-heavy apps such as blogs and e-commerce catalogs.
Does SeoKit support Open Graph, Twitter cards, and JSON-LD?
Yes, SeoKit covers meta tags, Open Graph, Twitter cards, and JSON-LD structured data. Its MetaTags class unifies these formats into a consistent API. This helps with rich snippets and social sharing without stitching together multiple packages.
How does caching work in SeoKit?
SeoKit includes built-in tag caching through Laravel's cache system to reduce redundant SEO queries. You still need to configure cache storage and TTL for your application. For database-backed SEO, eager load relationships with withSeo() and use aggressive caching on high-traffic pages to avoid N+1 queries.
Is SeoKit compatible with Inertia.js?
SeoKit has native Inertia.js support from v1.1.0 onward. Use the @seoKit Blade directive in your layouts and consider Inertia::share for global SEO values. Be careful with client-side routing and hydration mismatches when server-rendered SEO tags are involved.
Can I use SeoKit without publishing the database migration?
Yes, you can start with controller-driven SEO using the SeoKit facade and Blade directive without database-backed records. The seo_data migration is only needed when you want persistent, model-backed SEO metadata. This lets you adopt the package incrementally before committing to its schema.
What should I check before adding SeoKit to a legacy Laravel app?
Audit for existing seo or meta tables because the seo_data migration may conflict with legacy schemas. Run php artisan schema:dump before integration and test fallbackSeoData() merges with edge cases such as null versus empty strings. Also confirm the app meets the PHP 8.3 and Laravel 11 requirements.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections