PHP code example of notgosu / yii2-meta-tag-module

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

    

notgosu / yii2-meta-tag-module example snippets


./yii migrate --migrationPath=@vendor/notgosu/yii2-meta-tag-module/src/migrations

     public function behaviors()
     {
         return [
             //some other behaviors
             'seo' => [
                 'class' => \notgosu\yii2\modules\metaTag\components\MetaTagBehavior::className(),
                 'languages' => ['en', 'ua', 'ru'],
                 //'defaultFieldForTitle' => 'label'
             ]
         ];
     }

echo \notgosu\yii2\modules\metaTag\widgets\metaTagForm\Widget::widget(['model' => $model])

 'modules' => [
        //Some other modules
        'seo' => [
            'class' => \notgosu\yii2\modules\metaTag\Module::className()
        ]
    ],

 \notgosu\yii2\modules\metaTag\components\MetaTagRegister::register($model, Yii::$app->language);