linchpinstudios/yii2-seo
Composer 安装命令:
composer require linchpinstudios/yii2-seo
包简介
A full SEO manament system for Yii2.
README 文档
README
A full SEO manament system for Yii2.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist linchpinstudios/yii2-seo "*"
or add
"linchpinstudios/yii2-seo": "*"
to the require section of your composer.json file.
3) Run Migrations
For Blog ``` ./yii migrate/up --migrationPath=@vendor/linchpinstudios/yii2-seo/migrations ```Usage
Setup beforeAction in controllers you want to use SEO
{
if (parent::beforeAction($action)) {
$seoMetaTags = New \linchpinstudios\seo\models\Seo;
$seoMetaTags->run();
return true; // or false if needed
} else {
return false;
}
}```
To access the module, you need to add this to your application configuration:
```<?php
......
'modules' => [
'seo' => [
'class' => 'linchpinstudios\seo\Module',
],
],
......```
统计信息
- 总下载量: 172
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-10