PHPackages                             lee-to/laravel-seo-by-url - 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. lee-to/laravel-seo-by-url

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

lee-to/laravel-seo-by-url
=========================

Easy seo for Laravel and MoonShine

2.0.0(5mo ago)239.4k↑48.9%5MITPHPPHP ^8.0|^8.1|^8.2

Since Jan 21Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/lee-to/laravel-seo-by-url)[ Packagist](https://packagist.org/packages/lee-to/laravel-seo-by-url)[ RSS](/packages/lee-to-laravel-seo-by-url/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (14)Used By (0)

 [![Laravel 9+](https://camo.githubusercontent.com/25f5eb4448d4070222d178207fd71dd4f6a4187224f7ef05938e644e84af17cc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d392b2d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c)](https://laravel.com) [![PHP 8+](https://camo.githubusercontent.com/c7708de0b3e7f74775dfb728df6422153b9d8282d116a3cc20f83c96a2466a06/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382b2d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870)](https://laravel.com)

### Prolog

[](#prolog)

Seo data is stored in the database in the `seo` table and is linked to pages based on the url, the url is unique for websites, therefore, the seo in this package is built from it

- Easy to use
- Not tied to entities
- All data is cached relative to url and reset by events on the model

### Installation

[](#installation)

```
composer require lee-to/laravel-seo-by-url
```

Publish config

```
php artisan vendor:publish --provider="Leeto\Seo\Providers\SeoServiceProvider"
```

```
php artisan migrate
```

### Are you a visual learner?

[](#are-you-a-visual-learner)

We've recorded a [video](https://youtu.be/QjTsC1QF0co) on how to use this package. It's the best way to get started using media library

### MoonShine

[](#moonshine)

if you use the [MoonShine](https://getmoonshine.app/), then publish the resource with this command

```
#for version 4+
php artisan seo:moonshine

#for version 3
php artisan seo:moonshine_old
```

### Get started

[](#get-started)

For starters, you can choose the best usage approach for you:

- Facade

```
use Leeto\Seo\Seo;

// ...

Seo::title('Hello world')
```

- Helper

```
seo()->title('Hello world')
```

- DI

```
use Leeto\Seo\SeoManager;

// ...

public function __invoke(SeoManager $seo)
{
    //
}
```

- Ok I prefer to use the helper

### Blade directives

[](#blade-directives)

#### Render meta tags

[](#render-meta-tags)

title, descriptions, keywords, og

```

    @seo

```

#### Render seo text

[](#render-seo-text)

```

    @seoText('Default text')

```

### Set and save seo data

[](#set-and-save-seo-data)

- set

```
seo()->title('Im page title')
```

- set and save in database

```
seo()->title('Im page title', true)
```

- other tags

```
seo()->description('Im page description')
seo()->keywords('Im page description')
seo()->text('Im page description')
seo()->og(['image' => 'link to image'])
```

- get value

```
seo()->meta()->title()
seo()->meta()->description()
seo()->meta()->keywords()
seo()->meta()->text()
seo()->meta()->og()
```

- get html tags

```
seo()->meta()->html()
```

- save by model

```
use Leeto\Seo\Models\Seo;

Seo::create([
    'url' => '/',
    'title' => 'Im title'
]);
```

### Default values

[](#default-values)

Set in seo config `config/seo.php`

```
return [
    'default' => [
        'title' => 'Im title'
    ]
]);
```

### Inertia

[](#inertia)

Use Shared Data

```
class HandleInertiaRequests extends Middleware
{
    //
    public function share(Request $request)
    {
        return array_merge(parent::share($request), [
            // ...

            'seo' => [
                'title' => seo()->meta()->title(),
                'description' => seo()->meta()->description(),
                'keywords' => seo()->meta()->keywords(),
                'og' => seo()->meta()->og(),
                'text' => seo()->meta()->text(),
            ]
        ]);
    }
    //
}
```

```
import { Head } from '@inertiajs/vue3'

  {{ $page.props.seo.title }}

```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance70

Regular maintenance activity

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~86 days

Total

13

Last Release

176d ago

Major Versions

0.10.2 → 1.0.02023-10-29

1.0.1 → v2.x-dev2024-07-08

1.3.1 → 2.0.02025-11-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1861327?v=4)[Danil Shutsky](/maintainers/lee-to)[@lee-to](https://github.com/lee-to)

---

Top Contributors

[![lee-to](https://avatars.githubusercontent.com/u/1861327?v=4)](https://github.com/lee-to "lee-to (24 commits)")[![shevl-dev](https://avatars.githubusercontent.com/u/118539450?v=4)](https://github.com/shevl-dev "shevl-dev (9 commits)")[![saydum](https://avatars.githubusercontent.com/u/61598489?v=4)](https://github.com/saydum "saydum (5 commits)")[![DissNik](https://avatars.githubusercontent.com/u/12373059?v=4)](https://github.com/DissNik "DissNik (2 commits)")

---

Tags

laravelmoonshineseo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lee-to-laravel-seo-by-url/health.svg)

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

PHPackages © 2026

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