mihail / search-bundle
搜索Symfony2.8
dev-master
2016-01-15 13:23 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-09-18 19:12:39 UTC
README
步骤 1:下载 Bundle
从 Github 下载 Zip 文件。解压文件并将主文件夹重命名为 'SearchBundle'(移除 '-master')。将文件夹放置在 'src/Mihail/'(你需要创建名为 Mihail 的文件夹)中。结构如下:'src/Mihail/SearchBundle/...'(需要创建名为 Mihail 的文件夹,并将主文件夹重命名为 'SearchBundle',然后将其放置在 'src/Mihail/' 中,结构如下:'src/Mihail/SearchBundle/...')
步骤 2:启用 Bundle
通过将 Bundle 添加到项目中的 app/AppKernel.php
文件中注册的 Bundle 列表来启用 Bundle
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Mihail\SearchBundle\MihailSearchBundle(), ); // ... } // ... }
步骤 3:将 Bundle 添加到路由文件
将以下内容添加到 'app/config/routing.yml' 中
mihail_search: resource: "@MihailSearchBundle/Controller/" type: annotation prefix: /