momzor/zfc-user-last-connection-date

此包的最新版本(1.0)没有可用的许可证信息。

ZfcUser模块的最后连接日期

1.0 2015-03-04 13:52 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:43:42 UTC


README

Build Status Scrutinizer Code Quality Code Coverage

简介

ZfcUserLastConnectionDate是一个ZF2模块,它为ZfcUser的每次连接自动更新用户的最后连接日期。

有关ZfcUser的更多信息: ZfcUser

要求

安装

获取模块

使用composer

  1. 将此项目添加到您的composer.json中

    "require": {
        "momzor/zfc-user-last-connection-date": "dev-master"
    }
  2. 运行以下命令

    $ php composer.phar update

模块激活

在您的application.config.php文件中

return array(
    'modules' => array(
        // ...
        'ZfcUserLastConnectionDate',
    ),
        // ...
);

更新您的模型

通过扩展ZfcUserLastConnectionDate用户实体

use ZfcUserLastConnectionDate\Entity\LastConnectionDateUser;
class User extends LastConnectionDateUser
{

}

或者,如果您不想扩展它,可以使用Trait

use ZfcUserLastConnectionDate\Entity\LastConnectionTrait;
class User extends ZfcUser
{
    use LastConnectionTrait;
}

更新您的数据库模式

./vendor/momzor/zfc-user-last-connection-date/data/中有一些SQL示例

导航到 http://yourproject/user/login

配置

没有需要配置的内容!