it-yakutia/yii2-collective

Collective for yii2

Installs: 64

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0.3 2022-10-06 19:40 UTC

This package is auto-updated.

Last update: 2024-11-07 00:32:56 UTC


README

Collective server for yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist it-yakutia/yii2-collective "*"

or add

"it-yakutia/yii2-collective": "*"

to the require section of your composer.json file.

Add migration path in your console config file:

'controllerMap' => [
    ...
    'migration' => [
        ...
        'migrationPath' => [
            ...
            '@vendor/it-yakutia/collective/src/migrations',
            ...
        ],
    ]
]

Usage

Once the extension is installed, simply use it in your code by :

<?= Url::toRoute(['/collective/back/index']); ?>

Add RBAC roles:

collective

Custom view file:

'custom_view_for_modules' => [
    'collective_front' => [
        'index' => '@frontend/views/front_page/index',
        '_item' => '@frontend/views/front_page/_item',
        'view' => '@frontend/views/front_page/view',
    ],
],
<?= Url::toRoute(['/collective/front/index']); ?>