kahanov/food

Yii2 food module

Maintainers

Details

github.com/kahanov/food

Source

Issues

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2019-01-18 14:31 UTC

README

Запустите

composer require kahanov/food

Использование

Подключите модуль в файле конфигурации common/config/main.php

'modules' => [
    'food' => [
        'class' => 'kahanov\food\Module',
    ],
    ...
],

Подключите модуль в файле конфигурации backend/config/main.php

'modules' => [
    'food' => [
        'class' => 'kahanov\food\Module',
        'controllerNamespace' => 'kahanov\food\backend\controllers',
        'viewPath' => '@vendor/kahanov/food/backend/views',
        'defaultRoute' => 'dish/index',
    ],
    ...
],

Подключите модуль в файле конфигурации frontend/config/main.php

'modules' => [
    'food' => [
        'class' => 'kahanov\food\Module',
        'controllerNamespace' => 'kahanov\food\frontend\controllers',
        'viewPath' => '@vendor/kahanov/food/frontend/views',
    ],
    ...
],

Выполните миграцию


./yii migrate --migrationPath=@vendor/kahanov/food/migrations

Маршруты модуля backend

http://site/backend/food/dish

http://site/backend/food/ingredient

Маршруты модуля frontend

http://site/food