sergmoro1/yii2-resort

度假村或旅馆的房间和价格管理。

安装: 50

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

开放问题: 0

类型:yii2-extension

v1.1.2 2019-09-23 11:37 UTC

This package is auto-updated.

Last update: 2024-09-23 22:44:28 UTC


README

优点

按类别定义房间。描述房间、提供的服务。根据类别、食品、治疗确定房间价格。

安装

  1. 安装包。

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

运行以下命令:

composer require --prefer-dist sergmoro1/yii2-resort

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

"sergmoro1/yii2-resort": "~1.1"

  1. 初始化yii2-resort

sergmoro1/yii2-resort中所述进行博客初始化和配置。

  1. 运行迁移

php yii migrate --migrationPath=@vendor/sergmoro1/yii2-resort/src/migrations

  1. 通过批处理文件initresort将预定义文件复制到适当的文件夹。

在应用目录中执行命令以获取它。

cp ./vendor/sergmoro1/yii2-resort/src/initresort ./
php initresort

要启动应用程序,您需要确定您酒店的建筑名称、房间类别、住宿选项、食品。例如,您可以运行一个迁移。

  1. 使用示例准备并运行迁移

php yii migrate --migrationPath=@app/migrations/resort

配置

更改common/config/main.php

return [
  ...
  'modules' => [
    ...
    'resort' => ['class' => 'sergmoro1\resort\Module'],
    'slide' => ['class' => 'sergmoro1\slide\Module'],
    ],

替换默认的frontend/config/main.php

return [
  'email' => [
    'admin' => 'admin@your-site.ru',
    'contact' => 'admin@your-site.ru',
  ],
  'commentsPerPage' => 5,
  'authorShow' => true,
  // Header menu (example)
  'header-menu' => [
    'items' => [
      ['label' => 'Service', 'title' => 'About your serveces', 'url' => ['site/index']],
      ['label' => 'Blog', 'title' => 'Posts about ...', 'url' => ['post/index']],
      ['label' => 'Feedback', 'title' => 'Send us a short message by email', 'url' => ['site/feedback']],
    ],
  ],
  // Footer menus (example)
  'footer-menu' => [
    'first' => [
      ['label' => 'Service', 'title' => 'About your serveces', 'url' => ['site/index']],
      ['label' => 'Blog', 'title' => 'Posts about ...', 'url' => ['post/index']],
    ],
    'second' => [
      ['label' => 'Feedback', 'title' => 'Send us a short message by email', 'url' => ['site/feedback']],
    ],
  ],
  // fab fa-$icons[$id] fa-stack-1x fa-inverse
  'icons' => [
    'yandex' => 'yandex',
    'vkontakte' => 'vk',
  ],
  'common' => [
    'slides' => [
      ['id' => 1, 'caption' => 'Реклама'],
      ['id' => 2, 'caption' => 'Характерная черта'],
      ['id' => 3, 'caption' => 'Ключевая услуга'],
    ],
    // Description format
    // Title # Subtitle # Slogan # Link
    'highlights' => ['h4', 'p', 'small', 'b', 'p', 'small'],
  ],
];

启动

输入http://your-app/backend/web然后点击登录