手枪88/yii2-staffer

公司员工 CRUD

安装: 182

依赖: 2

建议者: 0

安全: 0

星标: 1

关注者: 5

分支: 0

开放问题: 0

类型:yii2-extension

dev-master 2017-08-01 08:27 UTC

This package is auto-updated.

Last update: 2024-08-27 21:58:02 UTC


README

员工手册(仅后端)。

包含管理(CRUD)员工的功能

  • 员工(姓名、照片、状态)
  • 员工类别

安装

执行以下命令

php composer require pistol88/yii2-staffer "*"

或者将以下内容添加到 composer.json 中

"pistol88/yii2-staffer": "*",

然后执行

php composer update

接下来,迁移数据库

php yii migrate --migrationPath=vendor/pistol88/yii2-staffer/migrations

不要忘记执行依赖的 staffer 模块的迁移

配置

在配置文件中的 modules 部分添加

    'modules' => [
        //..
        'staffer' => [
            'class' => 'pistol88\staffer\Module',
            'adminRoles' => ['administrator'],
        ],
        //..
    ]

在 components 部分添加

        'staffer' => [
            'class' => 'pistol88\staffer\Staffer',
        ],

使用

  • ?r=staffer/staffer/index - 员工
  • ?r=staffer/category/index - 类别

小部件

小部件正在开发中。