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(4d ago)116MITPHPPHP ^8.2CI passing

Since Mar 6Pushed yesterdayCompare

[ 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 today

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

44

—

FairBetter than 92% of packages

Maintenance100

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

4d 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.0M54](/packages/artesaos-seotools)[honeystone/laravel-seo

SEO metadata and JSON-LD package for Laravel.

34340.8k](/packages/honeystone-laravel-seo)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.4M36](/packages/nystudio107-craft-seomatic)[lionix/seo-manager

SEO Manager for Laravel Framework

2165.4k](/packages/lionix-seo-manager)[fomvasss/laravel-meta-tags

A package to manage SEO (meta-tags, xml-fields, etc.)

3028.7k](/packages/fomvasss-laravel-meta-tags)[calotype/seo

A package containing SEO helpers.

722.6k](/packages/calotype-seo)

PHPackages © 2026

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