pendalf89/yii2-blog

Yii2 博客模块

dev-master 2016-06-21 15:32 UTC

This package is auto-updated.

Last update: 2024-08-28 07:57:33 UTC


README

Yii2 博客模块安装

安装此扩展的首选方式是通过 composer

运行以下命令之一:

php composer.phar require --prefer-dist pendalf89/yii2-blog "*"

或者将以下内容添加到您的 composer.json 文件的 require 部分:

"pendalf89/yii2-blog": "*"

应用迁移

yii migrate --migrationPath=vendor/pendalf89/yii2-blog/migrations

配置

'modules' => [
    'blog' => [
        'class' => 'pendalf89\blog\Module',
        // This option automatically translit entered titles 
        // from russian symbols to english on fly. Default false.
        'autoTranslit' => true, 
        // Some options for CKEditor. Default custom options.
        'editorOptions' => [],
        // callback function for create post view url. Have $model argument.
        'viewPostUrlCallback' => function($model) {
                return '/' . $model->alias;
            },
    ],
],

不要忘记配置 PendalF89/yii2-filemanager 扩展。