chieff/yii2-cms-module

There is no license information available for the latest version (dev-main) of this package.

CMS module for Yii 2

dev-main 2024-01-04 16:29 UTC

This package is auto-updated.

Last update: 2024-04-04 17:01:39 UTC


README

Creating page

$modelClass = 'chieff\modules\Cms\models\Page';
$model = new $modelClass;
$model->scenario = 'page';

Routes

'components' => [
    'urlManager' => [
        'rules' => [
            '/category/<slug>' => 'cms/frontend-category/view',
            '/page/<slug>' => 'cms/frontend-page/view'
        ]
    ]
]

Migrations

./yii migrate --migrationPath=vendor/chieff/yii2-cms-module/migrations/

If you want delete tables later and didn't migrate another tables, use:

./yii migrate/down 4 --migrationPath=vendor/chieff/yii2-cms-module/migrations/