PHP code example of zhukovsergei / yii2-seo

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

    

zhukovsergei / yii2-seo example snippets


./yii migrate/up --migrationPath=@vendor/aquy/yii2-seo/migrations

./yii migrate/down --migrationPath=@vendor/aquy/yii2-seo/migrations

php composer.phar update


    if (is_null(Yii::$app->seo->block('title'))) {
        echo '<title>' . Html::encode($this->title) . '</title>';
    } else {
        echo '<title>' . Html::encode(Yii::$app->seo->block('title')) . '</title>';
    }