vov/yii2-announcement
最新稳定版本:0.9.7
Composer 安装命令:
composer require vov/yii2-announcement
包简介
write and read announcement in a frontend and backend
README 文档
README
Announcement module allows you to have announcement board with infinitely nested categories and regions
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist vov/yii2-announcement "*"
or add
"vov/yii2-announcement": "*"
Migration
you can use migrations that already exist in console/migartions
$ yii migrate --migrationPath='@vov/announcement/console/migrations'
or
$ yii migrate --migrationPath=@vendor/vov/yii2-announcement/console/migrations
it will create the tables: 1. an_cats - categories 2. an_regions - with data of all regions of Ukraine (uk-UA) 3. an_items - advertisement
Configuring
Configure common/config as follows
'modules' => [
'announcement' => [
'class' => 'vov\announcement\Module',
],
],
Configure backend/config as follows
'modules' => [
'announcement' => [
'controllerNamespace' => 'vov\announcement\backend\controllers',
],
],
Usage
to access to frontend: http://example.com/announcement/anitems http://example.com/announcement/anitems/create
to access to backend: http://backend.example.com/announcement/anitems http://backend.example.com/announcement/ancats http://backend.example.com/announcement/anregions
Also you can use a widget where you need as follows:
<?= \vov\announcement\widgets\Announcement::widget([
'perPage' => 5,
]); ?>
Generate module translations
$ yii message vendor/vov/yii2-announcement/messages/config.php
统计信息
- 总下载量: 58
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2015-10-06