PHP code example of dovaldev / filament-simple-seo
1. Go to this page and download the library: Download dovaldev/filament-simple-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/ */
dovaldev / filament-simple-seo example snippets
use Dovaldev\FilamentSimpleSeo\FilamentSimpleSeoPlugin;
// Dentro de tu builder de Panel
$panel->plugins([
FilamentSimpleSeoPlugin::make(),
]);
return [
];
use Dovaldev\FilamentSimpleSeo\Models\Seo;
/**
* Get the SEO data for the user.
*/
public function seo() {
return $this->morphOne(Seo::class, 'seoable');
}
/** SEO */
Forms\Components\Section::make('SEO')
->description('Add the SEO data to your model')
->relationship('seo')
->collapsed()
->collapsible()
->schema([
Forms\Components\TextInput::make('title')
->maxLength(255),
Forms\Components\TextInput::make('description')
->maxLength(255),
Forms\Components\Fieldset::make('Estado')
->schema([
Forms\Components\Toggle::make('index')->default(true),
Forms\Components\Toggle::make('follow')->default(true),
Forms\Components\Toggle::make('status')->default(true),
])
->columns(3),
]);