PHP code example of grptx / yii2-seo-tags
1. Go to this page and download the library: Download grptx/yii2-seo-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/ */
grptx / yii2-seo-tags example snippets
"grptx/yii2-seo-tags": "~1.0"
...
'components' => [
'seotag' => [
'class' => 'grptx\SEO\SeoTag',
// you can add some global tag here (optional)
'metas'=>[
'twitter'=>[
'twitter:creator'=>'@grptx'
// ...
]
// ...
]
]
...
]
/** @var \grptx\SEO\SeoTag $seotag */
$seotag = Yii::$app->seotag;
$seotag->setAndRender([
'facebook' => [
'og:title' => '<open graph title>'
// ...
],
'twitter' => [
// ...
],
'site' => [
// ...
]
]);
shell
php composer.phar