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

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

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

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

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

Since Mar 6Pushed 3mo 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 3w ago

READMEChangelogDependencies (18)Versions (7)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

40

—

FairBetter than 86% of packages

Maintenance81

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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 ~3 days

Total

6

Last Release

96d 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 (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[artesaos/seotools

SEO Tools for Laravel and Lumen

3.4k5.3M63](/packages/artesaos-seotools)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[flarum/core

Delightfully simple forum software.

201.4M2.2k](/packages/flarum-core)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)

PHPackages © 2026

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