PHPackages                             mb4it/laravel-seo - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mb4it/laravel-seo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mb4it/laravel-seo
=================

Reusable SEO package for Laravel models with locale-aware polymorphic SEO entries.

1.0.0(3mo ago)0250↑150%MITPHPPHP ^8.2

Since Apr 17Pushed 1mo agoCompare

[ Source](https://github.com/Dictator90/laravel-seo)[ Packagist](https://packagist.org/packages/mb4it/laravel-seo)[ RSS](/packages/mb4it-laravel-seo/feed)WikiDiscussions master Synced 3w ago

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

mb4it/laravel-seo
=================

[](#mb4itlaravel-seo)

Reusable Laravel SEO package for any Eloquent model via `UseSeo` trait.

Features
--------

[](#features)

- Locale-aware SEO records in separate `seo_entries` table (polymorphic relation).
- Configurable SEO fields with type map.
- Model-level SEO templates with placeholders (`{name}`, `{description}`).
- Artisan command for adding new physical SEO columns with migration generation.

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

[](#installation)

```
composer require mb4it/laravel-seo
```

Publish config and migrations:

```
php artisan vendor:publish --tag=laravel-seo-config
php artisan vendor:publish --tag=laravel-seo-migrations
php artisan migrate
```

Configure fields
----------------

[](#configure-fields)

`config/seo.php` supports two formats:

```
'fields' => ['h1', 'title']
```

All fields from list format default to `string`.

```
'fields' => [
    'h1' => 'string',
    'title' => 'string',
    'description' => 'text',
    'keywords' => 'string',
]
```

Supported types: `string`, `text`, `integer`, `boolean`, `json`.

Use in model
------------

[](#use-in-model)

```
use MB\Laravel\Seo\Concerns\UseSeo;

class News extends Model
{
    use UseSeo;
}
```

Available API:

- `seoEntries(): MorphMany`
- `seo(?string $locale = null): MorphOne|MorphMany` — without a locale returns all entries (`MorphMany`); with a locale returns the single entry for it (`MorphOne`)
- `setSeo(array $data, ?string $locale = null): SeoEntry`
- `getSeo(?string $locale = null): ?SeoEntry`

SEO templates
-------------

[](#seo-templates)

If model defines `seoTemplates()`, templates are applied automatically after model save.

```
public function seoTemplates(): array
{
    return [
        'h1' => '{name} - Site',
        'description' => '{description}',
    ];
}
```

Rules:

- Placeholder format: `{attribute_name}`.
- Missing attributes are replaced with empty string.
- Explicitly saved SEO values (via `setSeo`) are not overwritten by template values.

Add new SEO field (physical column)
-----------------------------------

[](#add-new-seo-field-physical-column)

Use command:

```
php artisan seo:add-field og_image string
```

What it does:

1. Creates migration `*_add_og_image_to_seo_entries_table.php`.
2. Tries to append `'og_image' => 'string'` to `config/seo.php`.

Options:

- `--no-config` - skip config file auto-update.

Example:

```
php artisan seo:add-field og_image string --no-config
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance85

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

98d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/75324054?v=4)[Maxim Bezvodinskikh](/maintainers/Dictator90)[@Dictator90](https://github.com/Dictator90)

---

Top Contributors

[![Dictator90](https://avatars.githubusercontent.com/u/75324054?v=4)](https://github.com/Dictator90 "Dictator90 (3 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (1 commits)")

---

Tags

laravelmetadataseo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mb4it-laravel-seo/health.svg)

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

###  Alternatives

[honeystone/laravel-seo

SEO metadata and JSON-LD package for Laravel.

35590.0k](/packages/honeystone-laravel-seo)[firefly-iii/data-importer

Firefly III Data Import Tool.

8055.8k](/packages/firefly-iii-data-importer)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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