tmcycyit/notification-bundle

安装: 151

依赖: 0

建议者: 0

安全: 0

星级: 0

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

2.0.4 2023-05-30 13:58 UTC

This package is not auto-updated.

Last update: 2024-09-17 19:52:00 UTC


README

安装

步骤1: 使用composer下载NotificationBundle

在composer.json中添加NotificationBundle

{
    "require": {
        "yit/notification-bundle": "dev-master",
    }
}

现在更新composer。

Composer会将bundle安装到项目中的vendor/yit目录。

步骤2: 启用bundle

在kernel中启用bundle

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Yit\NotificationBundle\YitNotificationBundle(),
    );
}

步骤3: 配置NotificationBundle

将以下配置添加到您的config.yml文件中

# app/config/config.yml
yit_notification:
    note_user: pathToYourUserBundle\Entity\User

###步骤4: 导入NotificationBundle路由文件

# app/config/routing.yml
yit_notification:
    resource: "@YitNotificationBundle/Controller/"
    type:     annotation
    prefix:   /

步骤5: 更新数据库模式

现在bundle已配置,您需要做的最后一件事是更新数据库模式。