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

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

34ml/laravel-seo
================

This package will help you to manage your website SEO easily.

v1.6(6mo ago)15.1k↓38.9%1[2 issues](https://github.com/34ML/laravel-seo/issues)1MITPHPPHP ^8.3

Since Dec 24Pushed 5mo agoCompare

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

READMEChangelog (7)Dependencies (12)Versions (8)Used By (1)

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

[](#laravel-seo)

This package will help you to manage your website SEO easily.

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

[](#installation)

You can install the package via composer:

```
composer require 34ml/laravel-seo
```

You can publish and run the migrations with:

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

You can publish the config file with:

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

This is the contents of the published config file:

```
return [
/*
    |--------------------------------------------------------------------------
    | SEO status
    |--------------------------------------------------------------------------
    |
    | Set SEO status, if its set to false then all pages will have
    | the 'noindex, nofollow' follow type and also removed the meta tags except the title tag.
    |
    */

    'seo_status' => env('SEO_STATUS', true),

    /*
    |--------------------------------------------------------------------------
    | Sitemap status
    |--------------------------------------------------------------------------
    |
    | Should there be a sitemap available
    |
    */
    'sitemap_status' => env('SITEMAP_STATUS', false),

    /*
    |--------------------------------------------------------------------------
    | SEO title formatter
    |--------------------------------------------------------------------------
    |
    | If you want a specific default format for your SEO titles, then you can
    | specify it here. Example could be ':text - Test site', then all pages would have
    | the ' - Test site' appended to the actual SEO title.
    |
    */
    'title_formatter' => ':text',

    /*
    |--------------------------------------------------------------------------
    | Follow type options
    |--------------------------------------------------------------------------
    |
    | Here is all the possible follow types shown in the admin panel
    | which is an array with key -> value.
    |
    */

    'follow_type_options' => [
        'index, follow' => 'Index and follow',
        'noindex, follow' => 'No index and follow',
        'index, nofollow' => 'Index and no follow',
        'noindex, nofollow' => 'No index and no follow',
    ],

    /*
    |--------------------------------------------------------------------------
    | Default follow type
    |--------------------------------------------------------------------------
    |
    | Set the default follow type.
    |
    */
    'default_follow_type' => env('SEO_DEFAULT_FOLLOW_TYPE', 'index, follow'),

    /*
      * SEO default title
      */
    'default_seo_title' => config('app.name'),

    /*
      * SEO default description
      */
    'default_seo_description' => null,

    /*
      * SEO default keywords
     * ex : keyword1, keyword2, keyword3
      */
    'default_seo_keywords' => null,

    /*
     *
     */
    /*
    |--------------------------------------------------------------------------
    | Sitemap models
    |--------------------------------------------------------------------------
    |
    | Insert all the laravel models which should be in the sitemap
    |
    */

    'sitemap_models' => [],

    /*
    |--------------------------------------------------------------------------
    | Sitemap url
    |--------------------------------------------------------------------------
    |
    | Set the path of the sitemap
    |
    */

    'sitemap_path' => '/sitemap',
    /*
    |--------------------------------------------------------------------------
    | Available Locales
    |--------------------------------------------------------------------------
    |
    | Set the available locales in your project and fallback locale
    |
    */

    'available_locales' => ['en'],
    'fallback_locale' => 'en',
];
```

Usage
-----

[](#usage)

Find the model you want to have the SEO fields on, example could be App\\Models\\Page, then add the SeoTrait trait:

```
use _34ML\SEO\Traits\SeoTrait;

class Page extends Model
{
    use SeoTrait;
    ...
}
```

When you want the eloquent model to be shown in the sitemap then you need to add the SeoSiteMapTrait trait to it:

```
use _34ML\SEO\Traits\SeoTrait;
use _34ML\SEO\Traits\SeoSiteMapTrait;

class Page extends Model
{
    use SeoTrait, SeoSiteMapTrait;
    ...

    /**
     * Get the Page url by item
     *
     * @return string
     */
    public function getSitemapItemUrl()
    {
        return url($this->slug);
    }

    /**
     * Query all the Page items which should be
     * part of the sitemap (crawlable for google).
     *
     * @return Builder
     */
    public static function getSitemapItems()
    {
        return static::all();
    }
}
```

Then go to the top of your layout blade as the default is resources/views/welcome.blade.php:

```
...

    @include('laravel-seo::seo')
    ...

```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Ahmed Essam](https://github.com/aessam13)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance49

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% 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 ~115 days

Recently: every ~172 days

Total

7

Last Release

186d ago

PHP version history (2 changes)v1.0PHP &gt;=8.1

v1.6PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7489e0695a574d6e6102a9545bd8a114581df7968b852938ed11b4f6519e6e24?d=identicon)[admin34ML](/maintainers/admin34ML)

---

Top Contributors

[![aessam13](https://avatars.githubusercontent.com/u/78547437?v=4)](https://github.com/aessam13 "aessam13 (15 commits)")[![MostafaHassan1](https://avatars.githubusercontent.com/u/42083130?v=4)](https://github.com/MostafaHassan1 "MostafaHassan1 (1 commits)")[![y-shaker](https://avatars.githubusercontent.com/u/101970164?v=4)](https://github.com/y-shaker "y-shaker (1 commits)")

---

Tags

laravellaravel-seo34ML

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M627](/packages/spatie-laravel-data)[ralphjsmit/laravel-seo

A package to handle the SEO in any Laravel application, big or small.

841433.3k21](/packages/ralphjsmit-laravel-seo)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[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)

PHPackages © 2026

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