PHPackages                             mahdijd/seo-management - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. mahdijd/seo-management

ActiveLibrary

mahdijd/seo-management
======================

A modern SEO management package for Laravel with first-class Filament v4 support.

v1.0.0(today)00MITPHPPHP ^8.2

Since Aug 8Pushed todayCompare

[ Source](https://github.com/mahdiJD/seo-management)[ Packagist](https://packagist.org/packages/mahdijd/seo-management)[ RSS](/packages/mahdijd-seo-management/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

Laravel Filament SEO Package
============================

[](#laravel-filament-seo-package)

[![PHP Version](https://camo.githubusercontent.com/187240af044d09d5b14a1d9d9ebdf3f7a993e4c7bc09bdb46b4ba661a891bf5b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c7565)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/5b99ec644e12357132ddb95970822afd67efedef92fcccb6270926adebd8b101/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31322e782d726564)](https://laravel.com)[![Filament Version](https://camo.githubusercontent.com/a57d676474640cd4ec21b394cb3221fd57c5a52defd6406505de3de24edfd29a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e742d342e782d6f72616e6765)](https://filamentphp.com)[![License](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)](LICENSE)

A modern, developer-friendly SEO management package for Laravel applications with first-class support for Filament v4.

Features
--------

[](#features)

- 🎯 **SEO for any Eloquent model** — add a single trait and you're done
- 🗺️ **Route SEO** — manage SEO for named routes without model backing
- ⚡ **Runtime overrides** — dynamically override any SEO field per-request
- 🌍 **Global defaults** — application-wide fallback values for all SEO fields
- 🧠 **Intelligent resolution** — priority chain: Runtime → Model → Route → Global
- 💾 **Aggressive caching** — rendered HTML is cached; zero DB queries on cache hits
- 🔄 **Automatic invalidation** — cache is cleared automatically when data changes
- 🎨 **Filament v4 integration** — `SeoManagerGroup`, `SeoRouteResource`, `SeoSettingsPage`
- 🏷️ **Complete meta tag support** — title, description, canonical, robots, Open Graph, Twitter Cards, JSON-LD

Requirements
------------

[](#requirements)

DependencyVersionPHP≥ 8.2Laravel12.xFilament4.x> Filament 5 is not supported in v1.x.

Installation
------------

[](#installation)

```
composer require mahdijd/seo-management
```

### Publish and migrate

[](#publish-and-migrate)

```
# Publish config
php artisan vendor:publish --tag=seo-config

# Publish migrations
php artisan vendor:publish --tag=seo-migrations

# Run migrations
php artisan migrate
```

Quick Start
-----------

[](#quick-start)

### 1. Add SEO to a model

[](#1-add-seo-to-a-model)

```
use Mahdijd\SeoManagement\Traits\HasSeo;

class Post extends Model
{
    use HasSeo;

    // Optional: provide dynamic fallback values
    public function getSeoFallback(): array
    {
        return [
            'title'       => $this->title,
            'description' => $this->excerpt,
        ];
    }
}
```

### 2. Render SEO tags in your Blade layout

[](#2-render-seo-tags-in-your-blade-layout)

```

```

### 3. Runtime overrides

[](#3-runtime-overrides)

```

```

### 4. Cacheable runtime pages

[](#4-cacheable-runtime-pages)

```

```

Facade Usage
------------

[](#facade-usage)

```
use Mahdijd\SeoManagement\Facades\Seo;

// Resolve SEO data for a model
$seoData = Seo::forModel($post);

// Resolve SEO for a named route
$seoData = Seo::forRoute('home');

// Manually clear model SEO cache
Seo::clearModel($post);

// Manually clear route SEO cache
Seo::clearRoute('home');

// Flush all SEO cache entries
Seo::flushAll();
```

Filament Integration
--------------------

[](#filament-integration)

Register the plugin in your panel provider:

```
use Mahdijd\SeoManagement\Filament\SeoPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            SeoPlugin::make(),
        ]);
}
```

Add `SeoManagerGroup` to any Filament resource form:

```
use Mahdijd\SeoManagement\Filament\Forms\SeoManagerGroup;

public static function form(Form $form): Form
{
    return $form->schema([
        // ... your other fields ...
        SeoManagerGroup::make(),
    ]);
}
```

Configuration
-------------

[](#configuration)

```
// config/seo.php
return [
    'cache'                => true,        // Enable/disable SEO caching
    'cache_store'          => null,        // Cache store (null = default)
    'cache_ttl'            => 86400,       // Cache TTL in seconds (24h)
    'default_robots'       => 'index,follow',
    'default_twitter_card' => 'summary_large_image',
    'filament' => [
        'delete_empty_records' => false,   // Delete seo_metadata when all fields null
        'navigation_group'     => 'SEO',   // Filament sidebar group label
    ],
];
```

Artisan Commands
----------------

[](#artisan-commands)

```
# Clear all SEO cache entries
php artisan seo:cache:clear
```

Architecture
------------

[](#architecture)

The package follows a strict layered architecture:

```
Blade Component ()
        ↓
    SeoManager
        ↓
SeoResolver     SeoRenderer     SeoCacheManager
        ↓
  Repository Layer (SeoMetadataRepository, SeoRouteRepository, SeoSettingsRepository)
        ↓
    Database (seo_metadata, seo_routes, seo_settings)

```

**Resolution priority (highest to lowest):**

1. Runtime overrides (Blade attributes / `resolve(array $runtime)`)
2. Model SEO (`seo_metadata` record + `getSeoFallback()`)
3. Route SEO (`seo_routes` record)
4. Global defaults (`seo_settings` record)

Supported Metadata
------------------

[](#supported-metadata)

CategoryTagsStandard``, `description`, `canonical`, `robots`, `keywords`Open Graph`og:title`, `og:description`, `og:image`, `og:type`, `og:url`, `og:site_name`Twitter Cards`twitter:card`, `twitter:title`, `twitter:description`, `twitter:image`Structured Data``Testing
-------

[](#testing)

```
# Run all tests
composer test

# Run with coverage
composer test:coverage

# Static analysis
composer analyse

# Code style check
composer lint:check
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for the full release history.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b3f7825ef0ec8d11fdea75b16f97df13e0d2fff14bc46bcaa932d35673a1936?d=identicon)[mahdijd](/maintainers/mahdijd)

---

Top Contributors

[![mahdiJD](https://avatars.githubusercontent.com/u/140229010?v=4)](https://github.com/mahdiJD "mahdiJD (18 commits)")

---

Tags

laravelseometafilamentopen-graph

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mahdijd-seo-management/health.svg)

```
[![Health](https://phpackages.com/badges/mahdijd-seo-management/health.svg)](https://phpackages.com/packages/mahdijd-seo-management)
```

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

4041.8k](/packages/codewithdennis-larament)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

471.8k](/packages/ercogx-laravel-filament-starter-kit)[slimani/filament-media-manager

A media manager plugin for Filament.

179.7k1](/packages/slimani-filament-media-manager)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.8k2](/packages/crumbls-layup)[mominalzaraa/filament-localization

The first and only automatic Filament localization package with intelligent resource scanning, structured translation files, and comprehensive testing

103.5k](/packages/mominalzaraa-filament-localization)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
