thienhungho/yii2-post-management

Yii2 Post Management

v1.1.0 2019-05-15 12:42 UTC

This package is auto-updated.

Last update: 2024-04-30 00:28:07 UTC


README

Post Management System for Yii2

Installation

This is just an example, memorible moment. The source code may not work for known reasons. This source code include against loss license feature.

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist thienhungho/yii2-post-management "*"

or add

"thienhungho/yii2-post-management": "*"

to the require section of your composer.json file.

Migration

Run the following command in Terminal for database migration:

yii migrate/up --migrationPath=@vendor/thienhungho/PostManagement/migrations

Or use the namespaced migration (requires at least Yii 2.0.10):

// Add namespace to console config:
'controllerMap' => [
    'migrate' => [
        'class' => 'yii\console\controllers\MigrateController',
        'migrationNamespaces' => [
            'thienhungho\PostManagement\migrations\namespaced',
        ],
    ],
],

Then run:

yii migrate/up

Config

Add module PostManage to your AppConfig file.

...
'modules'          => [
    ...
    /**
     * Post Manage
     */
    'post-manage' => [
        'class' => 'thienhungho\PostManagement\modules\PostManage\PostManage',
    ],
    /**
     * Post Frontend
     */
    'post' => [
        'class' => 'thienhungho\PostManagement\modules\PostFrontend\PostModule',
    ],
    ...
],
...

Modules

PostBase, PostManage, PostFrontend

Functions

Core

Constant

Core

Models

Post, PostType, TermOfPostType