PHPackages                             philiprehberger/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. philiprehberger/laravel-seo

ActiveLibrary

philiprehberger/laravel-seo
===========================

Fluent SEO metadata service for Laravel with Open Graph, Twitter Card, and JSON-LD structured data support

v1.0.4(1mo ago)116[1 PRs](https://github.com/philiprehberger/laravel-seo/pulls)MITPHPPHP ^8.2CI passing

Since Mar 6Pushed 1mo agoCompare

[ Source](https://github.com/philiprehberger/laravel-seo)[ Packagist](https://packagist.org/packages/philiprehberger/laravel-seo)[ Docs](https://github.com/philiprehberger/laravel-seo)[ RSS](/packages/philiprehberger-laravel-seo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (6)Used By (0)

Laravel SEO
===========

[](#laravel-seo)

[![Tests](https://github.com/philiprehberger/laravel-seo/actions/workflows/tests.yml/badge.svg)](https://github.com/philiprehberger/laravel-seo/actions/workflows/tests.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/e47cabdeb29d1fbede9be29e3685d7dadd79b1235f5a7b65b3a0126d0dd8b980/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068696c69707265686265726765722f6c61726176656c2d73656f2e737667)](https://packagist.org/packages/philiprehberger/laravel-seo)[![License](https://camo.githubusercontent.com/455d7c0ce81f824e000eee33c5e5536bae8aae2c0121f16d2d187188dc42696c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7068696c69707265686265726765722f6c61726176656c2d73656f)](LICENSE)

Fluent SEO metadata service for Laravel with Open Graph, Twitter Card, and JSON-LD structured data support.

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

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12

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

[](#installation)

```
composer require philiprehberger/laravel-seo
```

### Publish the config file

[](#publish-the-config-file)

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

This creates `config/laravel-seo.php` in your application.

### Optionally publish the Blade views

[](#optionally-publish-the-blade-views)

```
php artisan vendor:publish --tag=laravel-seo-views
```

Usage
-----

[](#usage)

### Blade Component

[](#blade-component)

Add the `` component inside your layout's `` tag:

```

```

The component reads all values from the `SeoService` singleton, but also accepts inline overrides:

```

```

### Fluent API via Facade

[](#fluent-api-via-facade)

```
use PhilipRehberger\Seo\Facades\Seo;

Seo::setTitle('My Page')
   ->setDescription('Welcome to my page.')
   ->setCanonical('https://example.com/page')
   ->setOgImage('https://example.com/og.jpg')
   ->setOgType('article')
   ->setNoindex(false);
```

### Service Injection

[](#service-injection)

```
use PhilipRehberger\Seo\SeoService;

class PageController extends Controller
{
    public function show(SeoService $seo): View
    {
        $seo->setTitle('About Us')
            ->setDescription('Learn about our team.');

        return view('about');
    }
}
```

### Page-Specific SEO from Config

[](#page-specific-seo-from-config)

```
Seo::forPage('home');
```

### JSON-LD Structured Data

[](#json-ld-structured-data)

```
Seo::addJsonLd([
    '@context' => 'https://schema.org',
    '@type'    => 'Article',
    'headline' => 'My Blog Post',
]);

// Built-in schema generators
Seo::addJsonLd(Seo::getOrganizationSchema());
Seo::addJsonLd(Seo::getWebsiteSchema());
Seo::addJsonLd(Seo::getServiceSchema('Web Design', 'We design beautiful websites.', 'Design'));
Seo::addJsonLd(Seo::getBreadcrumbSchema([
    ['name' => 'Home', 'url' => 'https://example.com/'],
    ['name' => 'Blog', 'url' => 'https://example.com/blog'],
]));
```

### Resetting Between Requests

[](#resetting-between-requests)

```
Seo::reset();
```

API
---

[](#api)

MethodDescription`Seo::setTitle(string $title)`Set the page title`Seo::setDescription(string $description)`Set the meta description`Seo::setCanonical(string $url)`Set the canonical URL`Seo::setOgImage(string $url)`Set the Open Graph image`Seo::setOgType(string $type)`Set the Open Graph type`Seo::setNoindex(bool $noindex)`Set the noindex flag`Seo::forPage(string $key)`Load SEO data from config for a page key`Seo::addJsonLd(array $schema)`Add a JSON-LD structured data block`Seo::getOrganizationSchema()`Generate an Organization schema array`Seo::getWebsiteSchema()`Generate a WebSite schema array`Seo::getServiceSchema(string $name, string $description, string $type)`Generate a Service schema array`Seo::getBreadcrumbSchema(array $items)`Generate a BreadcrumbList schema array`Seo::reset()`Reset the service stateDevelopment
-----------

[](#development)

```
composer install
vendor/bin/phpunit
vendor/bin/pint --test
vendor/bin/phpstan analyse
```

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance89

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Every ~2 days

Total

5

Last Release

56d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfd7d24cbbf32400fa13ce0bbe7a31edd2d66a6d4488eafdb3d64c5337bf0435?d=identicon)[philiprehberger](/maintainers/philiprehberger)

---

Top Contributors

[![philiprehberger](https://avatars.githubusercontent.com/u/8218077?v=4)](https://github.com/philiprehberger "philiprehberger (12 commits)")

---

Tags

laravelJSON-LDseometatwitter cardopengraph

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[artesaos/seotools

SEO Tools for Laravel and Lumen

3.3k5.1M60](/packages/artesaos-seotools)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[honeystone/laravel-seo

SEO metadata and JSON-LD package for Laravel.

34744.1k](/packages/honeystone-laravel-seo)

PHPackages © 2026

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