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

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

fabpl/laravel-seo
=================

A Laravel-native package to manage SEO-related HTML tags with precision and developer experience in mind.

1.0.0(10mo ago)05MITPHPPHP ^8.2

Since Jul 11Pushed 10mo agoCompare

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

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

Laravel Seo
===========

[](#laravel-seo)

A Laravel-native package to manage SEO-related HTML tags with precision and developer experience in mind.
Supports `title`, `meta`, `og:*`, `twitter:*`, and `canonical` tags — nothing more, nothing less.

---

✨ Features
----------

[](#-features)

- Fluent, expressive API via a `Seo` facade
- Supports standard SEO, Open Graph, and Twitter tags
- Automatically renders tags via the `@seo` Blade directive
- Enum-based tag validation for strict SEO compliance
- Default fallback values via `config/seo.php`
- Auto-injects `` (optional)

---

🚀 Installation
--------------

[](#-installation)

```
composer require fabpl/laravel-seo
```

Publish the config file:

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

---

⚙️ Configuration
----------------

[](#️-configuration)

Edit the `config/seo.php` file to set global defaults:

```
return [

    /*
    |--------------------------------------------------------------------------
    | Default Title
    |--------------------------------------------------------------------------
    |
    | This title will be used if no title is explicitly set via Seo::title().
    |
    */
    'title' => env('APP_NAME', 'Laravel'),

    /*
    |--------------------------------------------------------------------------
    | Default Meta Tags
    |--------------------------------------------------------------------------
    |
    | Meta tags that should be included by default on all pages.
    | Only tags defined in MetaTags enum are supported.
    |
    */
    'meta' => [
        'author' => '',
        'description' => '',
        'keywords' => '',
        'robots' => 'index, follow',
    ],

    /*
    |--------------------------------------------------------------------------
    | Default Open Graph Tags
    |--------------------------------------------------------------------------
    |
    | Open Graph tags included on all pages. Keys must match values from
    | the OpenGraphTags enum.
    |
    */
    'open_graph' => [
        'og:description' => '',
        'og:image' => '',
        'og:locale' => env('APP_LOCALE', 'en'),
        'og:site_name' => env('APP_NAME', 'Laravel'),
        'og:title' => env('APP_NAME', 'Laravel'),
        'og:type' => 'website',
    ],

    /*
    |--------------------------------------------------------------------------
    | Default Twitter Tags
    |--------------------------------------------------------------------------
    |
    | Twitter card tags included by default. Keys must match values from
    | the TwitterTags enum.
    |
    */
    'twitter' => [
        'twitter:card' => 'summary_large_image',
        'twitter:creator' => '', // e.g. '@username'
        'twitter:description' => '',
        'twitter:image' => '',
        'twitter:site' => '', // e.g. '@yourhandle'
        'twitter:title' => env('APP_NAME', 'Laravel'),
    ],

    /*
    |--------------------------------------------------------------------------
    | Auto Canonical URL
    |--------------------------------------------------------------------------
    |
    | When enabled, the current URL will be automatically added as a canonical
    | tag unless manually overridden via Seo::canonical().
    |
    */
    'auto_canonical' => true,

];
```

---

✅ Usage
-------

[](#-usage)

### In a controller:

[](#in-a-controller)

```
use Fabpl\Seo\Facades\Seo;
use Fabpl\Seo\Enums\MetaTags;
use Fabpl\Seo\Enums\OpenGraphTags;
use Fabpl\Seo\Enums\TwitterTags;

Seo::title('Laravel Seo Package')
    ->description('A Laravel-native package to manage SEO-related HTML tags with precision and developer experience in mind.')
    ->twitter(TwitterTags::Creator, '@fabpl')
    ->canonical('https://github.com/fabpl/laravel-seo');
```

### In a Blade layout:

[](#in-a-blade-layout)

```

    ...
    @seo

```

---

🔐 Strict SEO Tag Validation
---------------------------

[](#-strict-seo-tag-validation)

Only officially supported SEO tags are allowed. All supported keys are defined as PHP `enum` classes:

- `Fabpl\Seo\Enums\MetaTags`
- `Fabpl\Seo\Enums\OpenGraphTags`
- `Fabpl\Seo\Enums\TwitterTags`

Invalid keys throw exception.

---

📦 API Reference
---------------

[](#-api-reference)

```
Seo::title(string $title): self;
Seo::description(string $description): self;
Seo::keywords(array $keywords): self;
Seo::author(string $author): self;
Seo::canonical(string $url): self;
Seo::meta(MetaTags $name, string $content): self;
Seo::openGraph(OpenGraphTags $name, string $content): self;
Seo::twitter(TwitterTags $name, string $content): self;
Seo::render(): HtmlString;

```

---

🧪 Testing
---------

[](#-testing)

Tests are included and can be run with:

```
composer test
```

---

📄 License
---------

[](#-license)

MIT © [Fabrice](https://github.com/fabpl)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance54

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

305d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69b7c03d8ddf04ea840dc49371523f2c0956e2afafd98f5815d1da55cdb67824?d=identicon)[fabpl](/maintainers/fabpl)

---

Top Contributors

[![fabpl](https://avatars.githubusercontent.com/u/6574025?v=4)](https://github.com/fabpl "fabpl (1 commits)")

---

Tags

laravelseo

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[honeystone/laravel-seo

SEO metadata and JSON-LD package for Laravel.

34744.1k](/packages/honeystone-laravel-seo)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[larament/seokit

A complete SEO package for Laravel, covering everything from meta tags to social sharing and structured data.

411.9k](/packages/larament-seokit)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[hotwired-laravel/stimulus-laravel

Use Stimulus in your Laravel app

3015.3k1](/packages/hotwired-laravel-stimulus-laravel)

PHPackages © 2026

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