PHPackages                             ralphjsmit/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. [Admin Panels](/categories/admin)
4. /
5. ralphjsmit/laravel-filament-seo

ActiveLibrary[Admin Panels](/categories/admin)

ralphjsmit/laravel-filament-seo
===============================

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

2.2.0(2mo ago)15398.7k↓15.6%28[3 issues](https://github.com/ralphjsmit/laravel-filament-seo/issues)8MITPHPPHP ^8.0CI failing

Since Feb 17Pushed 2mo ago2 watchersCompare

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

READMEChangelog (10)Dependencies (24)Versions (29)Used By (8)

[![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 RalphJSmit\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 ralphjsmit/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**:

```
