phlexible/redirect-bundle

phlexible 重定向组件

安装: 63

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:symfony-bundle

1.1.1 2017-01-27 13:40 UTC

This package is auto-updated.

Last update: 2024-09-08 06:42:57 UTC


README

PhlexibleRedirectBundle 为 phlexible 添加了重定向支持。

安装

  1. 使用 composer 下载 PhlexibleRedirectBundle
  2. 启用组件
  3. 更新数据库模式
  4. 清除 symfony 缓存

步骤 1:使用 composer 下载 PhlexibleRedirectBundle

运行以下命令添加 PhlexibleRedirectBundle

$ php composer.phar require phlexible/ct-bundle "~1.0.0"

Composer 将将组件安装到项目目录的 vendor/phlexible 下。

步骤 2:启用组件

在内核中启用组件

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Phlexible\Bundle\RedirectBundle\PhlexibleRedirectBundle(),
    );
}

步骤 3:更新数据库模式

由于重定向组件包含需要在数据库中安装的实体,所以组件设置完毕后,您还需要更新数据库模式。

对于 ORM 运行以下命令。

$ php app/console doctrine:schema:update --force

步骤 4:清除 symfony 缓存

如果您在 prod 环境下访问 phlexible 应用,请清除缓存

$ php app/console cache:clear --env=prod