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

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

iki/seo-meta
============

A Laravel Nova field.

1.1.0(2y ago)02.4kMITPHPPHP ^7.3|^8.0

Since Jul 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ibrahem-kamal/nova-seo-field)[ Packagist](https://packagist.org/packages/iki/seo-meta)[ RSS](/packages/iki-seo-meta/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

SEO meta field nova
===================

[](#seo-meta-field-nova)

> **This is a fork from the [original package](https://github.com/AndreasGJ/seo-meta-field-nova) but has more features and updated to Nova4**

This custom nova field, can add SEO related fields to any Model through a morph relationship within one single trait.

if you are upgrading from v1 please read the [upgrade guide](UPGRADING.md)
--------------------------------------------------------------------------

[](#if-you-are-upgrading-from-v1-please-read-the-upgrade-guide)

How to install
--------------

[](#how-to-install)

To install the package run the install below:

```
composer require ikiEN/nova-seo-field

```

And then publish the configs and migrations :

```
php artisan vendor:publish --provider="Iki\SeoMeta\FieldServiceProvider"

```

And then run the migrations:

```
php artisan migrate

```

How to use the field
--------------------

[](#how-to-use-the-field)

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

```
...
use Iki\SeoMeta\Traits\SeoMetaTrait;

class Page extends Model
{
    use SeoMetaTrait;
    ...
}

```

Then use the field in the nova resource `App\Nova\Page`:

```
...
use Iki\SeoMeta\SeoMeta;

class Page extends Resource
{
  ...
  public function fields(Request $request)
  {
    return [
      ...,
      SeoMeta::make('SEO', 'seo_meta')
        ->disk('s3-public') //disk to store seo image, default is public
    ];
  }
}

```

Then go to the top of your layout blade as default it's `resources/views/welcome.blade.php`:

```
...

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

```

Where the `@include('seo-meta::seo', ['page' => $page])`, should have the model instance with the relation to the `SeoMetaTrait` trait.

If you dont have any selected model/resource on the current page, then get the given SEO data for the page like this:

```
use Iki\SeoMeta\Helper\Seo;
...
Route::get('/tester', function(){
    return view('page', [
        'seo' => Seo::renderAttributes('SEO title', 'SEO description', 'SEO keywords', 'SEO image', 'index, follow'), // Builds the seo array
    ]);
});

```

Here is how the `Seo::renderAttributes` static method looks like:

Localization
------------

[](#localization)

- **for localization just update the config file with the available locales and the fallback locale**

Setup default values for a model
--------------------------------

[](#setup-default-values-for-a-model)

If the SEO values should have the same structure every time, then you are able to set the up with the following methods in the trait:

```
    /**
     * REGISTERING THE DEFAULT VALUES IF EXISTS
     */
    public function registerDefaultValues(): void
    {

        // add default SEO title for the model
        $this->addTitleDefault(string $value = null, string $locale = null): void

        // add default SEO description for the model
        $this->addDescriptionDefault(string $value = null, string $locale = null): void

        // add default SEO keywords for the model
        $this->addKeywordsDefault(string $value = null, string $locale = null): void

        // add default SEO image for the model
        $this->addImageDefault(string $value = null): void

         // add default SEO follow for the model
        $this->addFollowDefault(string $value): void
    }

```

Setup Sitemap functionality
---------------------------

[](#setup-sitemap-functionality)

If you want the sitemap functionality then activate the sitemap by changing the `seo.sitemap_status` config to `true`. Then add the models which has the `SeoSitemapTrait` trait to the `seo.sitemap_models` array, like this:

```
    ...
    'sitemap_status' => env('SITEMAP_STATUS', true),

    ...
    'sitemap_models' => [
        App\Models\Page::class
    ],

```

### Add Sitemap trait to models

[](#add-sitemap-trait-to-models)

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

```
...
use Iki\SeoMeta\Traits\SeoSitemapTrait;

class Page extends Model
{
    use SeoMetaTrait, 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();
    }
}

```

Know you should be able to go to the `seo.sitemap_path` which is `/sitemap` as default. Then you should get an xml in the correct sitemap structure for [Google Search Console](https://search.google.com/search-console/about).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

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

Total

2

Last Release

1037d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/033bc7c0b8c92e1771f366c5681ca9b9b5b1f81efba3046ae73ae445d3d491a2?d=identicon)[ibrahem-kamal](/maintainers/ibrahem-kamal)

---

Top Contributors

[![ibrahem-kamal](https://avatars.githubusercontent.com/u/38753243?v=4)](https://github.com/ibrahem-kamal "ibrahem-kamal (3 commits)")

---

Tags

laravelnova

### Embed Badge

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

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

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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