PHPackages                             digitonic/laravel-filament-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. digitonic/laravel-filament-seo

ActiveLibrary

digitonic/laravel-filament-seo
==============================

A package to combine the power of Laravel SEO and Filament Admin.

1.0.0(8mo ago)043MITPHPPHP ^8.2

Since Aug 26Pushed 8mo agoCompare

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

READMEChangelog (1)Dependencies (12)Versions (2)Used By (0)

[![laravel-filament-seo](https://github.com/ralphjsmit/laravel-filament-seo/raw/main/docs/images/laravel-filament-seo.jpg)](https://github.com/ralphjsmit/laravel-filament-seo/blob/main/docs/images/laravel-filament-seo.jpg)

Combine the power of Laravel SEO and Filament PHP.
==================================================

[](#combine-the-power-of-laravel-seo-and-filament-php)

This package is a **convenient helper for using the [laravel-seo](https://github.com/ralphjsmit/laravel-seo) package** with [Filament Admin and Forms](https://filamentphp.com).

It provides a simple component that returns a Filament fieldgroup to modify the `title`, `author` and `description` fields of the SEO model. It automatically **takes care of getting and saving all the data** to the `seo()` relationship, and you can thus use it anywhere, **without additional configuration!**

```
use Filament\Resources\Form;
use Digitonic\Filament\SEO\SEO;

public static function form(Form $form): Form
{
    return $form->schema([
        SEO::make(),
       // .. Your other fields
    ]);
}
```

Here's an example of how the `SEO` component looks like:

[![Using the Laravel Filament SEO component](https://raw.githubusercontent.com/ralphjsmit/laravel-filament-seo/main/docs/images/card.png)](https://raw.githubusercontent.com/ralphjsmit/laravel-filament-seo/main/docs/images/card.png)

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

[](#installation)

First, install the packages:

```
composer require digitonic/laravel-filament-seo
```

This will the require the `ralphjsmit/laravel-seo` as well if you didn't have that installed. Be sure to [check out the documentation of the main package](https://github.com/ralphjsmit/laravel-seo) and configure the values in the special `seo.php` config file!

Next, make sure that the **Eloquent Model** you're editing **uses the `HasSEO` trait**:

```
class Post extends Model
{
    use HasSEO;
}
```

Now the **`SEO::make()` helper is available to use anywhere** you want. Below are several examples how to use it:

### In Filament Admin

[](#in-filament-admin)

This is an example of **using this package in the classic [Filament Admin](https://filamentphp.com/docs/2.x/admin/installation)**.

It works for **both creating and editing posts**:

```
