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

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

claudiusnascimento/seo
======================

Generate SEO tags

v0.1.1(5y ago)02MITPHPPHP ^7.0

Since Aug 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/claudiusnascimento/seo)[ Packagist](https://packagist.org/packages/claudiusnascimento/seo)[ Docs](https://github.com/claudiusnascimento/seo)[ RSS](/packages/claudiusnascimento-seo/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Config SEO in your laravel models
=================================

[](#config-seo-in-your-laravel-models)

As the title says, this package config the Search Engine Optimization in your laravel models, even save the SEO in your database if you wanted to

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

[](#installation)

You can install the package via composer:

```
composer require claudiusnascimento/seo:0.1.1
```

### Add SeoServiceProvider in config\\app.php service providers array

[](#add-seoserviceprovider-in-configappphp-service-providers-array)

```
ClaudiusNascimento\Seo\SeoServiceProvider::class
```

### Add SeoFacade in config\\app.php aliases array

[](#add-seofacade-in-configappphp-aliases-array)

```
'Seo' => ClaudiusNascimento\Seo\SeoFacade::class
```

### Add the trait in your model

[](#add-the-trait-in-your-model)

```
use ClaudiusNascimento\Seo\Traits\SeoTrait;

class Page
{
    use SeoTrait;
}
```

### Publish the config file (not mandatory)

[](#publish-the-config-file-not-mandatory)

```
php artisan vendor:publish --provider="ClaudiusNascimento\Seo\SeoServiceProvider" --tag="config"
```

Usage
-----

[](#usage)

Now, you can set the SEO in your controllers, like so

```
public function homePage()
{
    $page = Page::find(1);

    \Seo::setTitle('Home Page');
}
```

Add the following, in the appropriate location, to generate the meta tags

```
{!! \Seo::generate() !!}
```

This line will generate the SEO HTML meta tags.

Saving in Database
------------------

[](#saving-in-database)

If you want, and I higly recomend, you can save the SEO in the database.

### Migrate the seo table

[](#migrate-the-seo-table)

```
php artisan migrate --path=vendor/claudiusnascimento/seo/database/migrations
```

### In your edit model view, put the follow html

[](#in-your-edit-model-view-put-the-follow-html)

```
{{ $model->generateSeo() }}
```

This line will display the form do store the seo in your database. You can put this in other location, BUT, will need the $model instance.

### How this works

[](#how-this-works)

To generate the forms to store SEO, the package need the model id and model relation, the ID will get from $model-&gt;id, and the seo relation will get automatically from class\_basename. Is higly recomended you change this behaviour.

In your model you can add the property:

```
public $seo_relation = 'pages'; // for example
```

Or, you can add a method:

```
public function getSeoRelation()
{
    return 'pages';
}
```

Now, the way you set the SEO in your controllers will change

```
public function homePage()
{
    $page = Page::find(1);

    \Seo::setModel($page);
}
```

And the code will get the SEO store in your edit views

\*\*\* you can put the seo form to store the SEO in any location. Just the model object is necessary \*\*\*

### Changelog

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Claudius Nascimento](https://github.com/claudiusnascimento)

License
-------

[](#license)

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

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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 ~0 days

Total

2

Last Release

2080d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/abe3013d55f63cacf8a4f4fd4f30ad28a472ebec38a5cb4c73fb5dcac16fe672?d=identicon)[claudiusnascimento](/maintainers/claudiusnascimento)

---

Top Contributors

[![claudiusnascimento](https://avatars.githubusercontent.com/u/3176741?v=4)](https://github.com/claudiusnascimento "claudiusnascimento (2 commits)")

---

Tags

seoclaudiusnascimento

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[artesaos/seotools

SEO Tools for Laravel and Lumen

3.3k5.1M60](/packages/artesaos-seotools)[butschster/meta-tags

The most powerful and extendable tools for managing SEO Meta Tags in your Laravel project

628730.7k2](/packages/butschster-meta-tags)[fomvasss/laravel-meta-tags

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

3028.9k](/packages/fomvasss-laravel-meta-tags)[madeitbelgium/seo-analyzer

SEO Analyzer

334.8k1](/packages/madeitbelgium-seo-analyzer)

PHPackages © 2026

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