phlexible/indexer-bundle

phlexible 索引器包

安装: 740

依赖项: 5

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 1

开放问题: 0

类型:symfony-bundle

1.1.6 2018-07-27 09:21 UTC

This package is auto-updated.

Last update: 2024-09-08 06:37:22 UTC


README

PhlexibleIndexerBundle 为 phlexible 添加了内容索引支持。

安装

  1. 使用 composer 下载 PhlexibleIndexerBundle
  2. 启用 Bundle
  3. 导入 PhlexibleIndexerBundle 路由
  4. 清除 symfony 缓存

步骤 1:使用 composer 下载 PhlexibleIndexerBundle

运行命令添加 PhlexibleIndexerBundle

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

Composer 会将包安装到项目的 vendor/phlexible 目录。

步骤 2:启用 Bundle

在 Kernel 中启用 Bundle

<?php
// app/AppKernel.php

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

步骤 3:导入 PhlexibleIndexerBundle 路由

导入 PhlexibleIndexerBundle 路由。

# app/config/routing.yml
phlexible_indexer:
    resource: "@PhlexibleIndexerBundle/Controller/"
    type:     annotation

步骤 4:清除 symfony 缓存

如果您的 phlexible 应用程序运行在 prod 环境中,请清除缓存

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