PHP code example of maatify / seo
1. Go to this page and download the library: Download maatify/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/ */
maatify / seo example snippets
use Maatify\Seo\Shared\DTO\MetaTagsDTO;
use Maatify\Seo\Web\Render\SeoHeadHtmlRenderer;
$metaTags = new MetaTagsDTO(
title: 'About Us',
description: 'Learn more about our framework-agnostic SEO library.',
canonicalUrl: 'https://example.com/about',
openGraphTitle: 'About Us',
openGraphDescription: 'Learn more about our framework-agnostic SEO library.',
openGraphUrl: 'https://example.com/about',
openGraphType: 'website',
);
$renderer = new SeoHeadHtmlRenderer();
echo $renderer->render($metaTags);