PHPackages                             dominicbachmann/seo-meta-nova-field - 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. dominicbachmann/seo-meta-nova-field

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

dominicbachmann/seo-meta-nova-field
===================================

A fork from gwd/seo-meta-nova-field translated to german.

v1.2.3(4y ago)017MITPHPPHP &gt;=7.1.0

Since Oct 1Pushed 4y agoCompare

[ Source](https://github.com/dominicbachmann/seo-meta-field-nova)[ Packagist](https://packagist.org/packages/dominicbachmann/seo-meta-nova-field)[ Docs](https://github.com/dominicbachmann/seo-meta-field-nova)[ RSS](/packages/dominicbachmann-seo-meta-nova-field/feed)WikiDiscussions master Synced 3d ago

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

This is fork from

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

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

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

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

[](#how-to-install)

To install the package run the install below:

```
composer require gwd/seo-meta-nova-field

```

And then run the migrations:

```
php artisan migrate

```

And then publish the configs:

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

```

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 Gwd\SeoMeta\Traits\SeoMetaTrait;

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

```

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

```
...
use Gwd\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 Gwd\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:

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:

```
// Return the SEO title for the model
public function getSeoTitleDefault(): string

// Return the SEO description for the model
public function getSeoDescriptionDefault(): string

// Return the SEO keywords for the model
public function getSeoKeywordsDefault(): string

// Return the SEO image for the model
public function getSeoImageDefault(): string

// Return the SEO follow type for the model
public function getSeoFollowDefault(): string

```

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 Gwd\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).

How does it look in Laravel Nova
--------------------------------

[](#how-does-it-look-in-laravel-nova)

If the field is shown **in the index view** of the Resource, then you should see a column with a dot: [![alt text](/assets/images/seo-field-index.jpg)](/assets/images/seo-field-index.jpg)

**In detail view** you will see a text saying `You need some SEO data` if no SEO is setup yet. But if you have any then, you will get the toggle button, which will show you an example how it will look like on Google and on Facebook: [![alt text](/assets/images/seo-field-detail-hidden.jpg)](/assets/images/seo-field-detail-hidden.jpg)[![alt text](/assets/images/seo-field-detail-show.jpg)](/assets/images/seo-field-detail-show.jpg)

**In form view** you should see all the SEO input fields: [![alt text](/assets/images/seo-field-form.jpg)](/assets/images/seo-field-form.jpg)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 83.6% 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 ~41 days

Recently: every ~107 days

Total

18

Last Release

1723d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64000291?v=4)[Dominic Bachmann](/maintainers/dominicbachmann)[@dominicbachmann](https://github.com/dominicbachmann)

---

Top Contributors

[![AndreasGJ](https://avatars.githubusercontent.com/u/4068425?v=4)](https://github.com/AndreasGJ "AndreasGJ (51 commits)")[![dominicbachmann](https://avatars.githubusercontent.com/u/64000291?v=4)](https://github.com/dominicbachmann "dominicbachmann (7 commits)")[![semsphy](https://avatars.githubusercontent.com/u/423396?v=4)](https://github.com/semsphy "semsphy (2 commits)")[![marcorivm](https://avatars.githubusercontent.com/u/1222598?v=4)](https://github.com/marcorivm "marcorivm (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/dominicbachmann-seo-meta-nova-field/health.svg)

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

###  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)
