PHP code example of codedor / filament-seo
1. Go to this page and download the library: Download codedor/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/ */
codedor / filament-seo example snippets
use Codedor\Seo\Tags\Meta;
use Codedor\Seo\Tags\OgUrl;
use Codedor\Seo\Tags\OpenGraph;
use Codedor\Seo\Tags\OpenGraphImage;
// config for Codedor/Seo
return [
'models' => [
'seo-route' => \Codedor\Seo\Models\SeoRoute::class,
],
'default' => [
'title_og' => [
'type' => OpenGraph::class,
'name' => 'title',
'content' => config('app.name'),
],
'title_meta' => [
'type' => Meta::class,
'name' => 'title',
'content' => config('app.name'),
],
'description_og' => [
'type' => OpenGraph::class,
'name' => 'description',
'content' => '',
],
'description_meta' => [
'type' => Meta::class,
'name' => 'description',
'content' => '',
],
'image_og' => [
'type' => OpenGraphImage::class,
'name' => 'image',
'content' => '',
],
'type_og' => [
'type' => OpenGraph::class,
'name' => 'type',
'content' => 'website',
],
'url_og' => [
'type' => OgUrl::class,
'name' => 'url',
'content' => '',
],
],
];
// Filament
\Codedor\Seo\Filament\SeoCard::make();
// Front-end
@seo()
bash
php artisan vendor:publish --tag="filament-seo-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="filament-seo-config"