PHP code example of martin-ro / filament-seo-meta-tags

1. Go to this page and download the library: Download martin-ro/filament-seo-meta-tags library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

martin-ro / filament-seo-meta-tags example snippets


class Page extends Model
{
    use HasSeoMetaTags;

    // ...
}

SeoTitle::make()

SeoTitle::make(name: 'title', minLength: 50, maxLength: 70, rows: 2, strict: false)

SeoDescription::make()

SeoDescription::make(name: 'description', minLength: 150, maxLength: 165, rows: 4, strict: false)

SeoRobots::make()

protected $middlewareGroups = [
    'web' => [
       // ...
       \App\Http\Middleware\AddSeoMetaTagDefaults::class,
    ],
];
bash
php artisan migrate
bash
php artisan filament-seo-meta-tags:publish-middleware