PHP code example of tomatophp / filament-seo

1. Go to this page and download the library: Download tomatophp/filament-seo 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/ */

    

tomatophp / filament-seo example snippets


->plugin(
    \TomatoPHP\FilamentSeo\FilamentSeoPlugin::make()
)

->plugin(
    \TomatoPHP\FilamentSeo\FilamentSeoPlugin::make()
        ->allowAutoPostsIndexing()
        ->postUrl('/blog') // your post url
        ->postSlug('slug') // your post slug or id
)

dispatch(new \TomatoPHP\FilamentSeo\Jobs\GoogleIndexURLJob([
    'url' => 'https://example.com'
]));

dispatch(new \TomatoPHP\FilamentSeo\Jobs\GoogleRemoveIndexURLJob([
    'url' => 'https://example.com'
]));

use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable
{
    use HasRoles;

    // ...
}

->plugin(\BezhanSalleh\FilamentShield\FilamentShieldPlugin::make())

->plugin(\TomatoPHP\FilamentCms\FilamentCMSPlugin::make()->allowShield())
bash
php artisan filament-seo:install
bash
php artisan shield:install
bash
php artisan vendor:publish --tag="filament-users-config"
bash
php artisan vendor:publish --tag="filament-seo-config"
bash
php artisan vendor:publish --tag="filament-seo-views"
bash
php artisan vendor:publish --tag="filament-seo-lang"
bash
php artisan vendor:publish --tag="filament-seo-migrations"