pvessel / article-bundle
简单的 CRUD 文章包。
dev-master
2014-10-09 20:47 UTC
Requires
- php: >=5.3.2
- symfony/framework-bundle: ~2.3
Requires (Dev)
- phpunit/phpunit: ~3.7
- symfony/console: ~2.3
- symfony/yaml: ~2.3
This package is not auto-updated.
Last update: 2024-09-24 07:55:44 UTC
README
此包允许创建和查看文章。
安装
步骤 1: 使用 composer 下载 PvesselArticleBundle
运行以下命令让 composer 需要 PvesselArticleBundle
$ php composer.phar require "pvessel/article-bundle:dev-master"
Composer 将安装此包到项目中的 vendor/pvessel/article-bundle
目录。
步骤 2: 启用包
在内核中启用包
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Pvessel\ArticleBundle\PvesselArticleBundle(), ); }
步骤 3: 添加到路由器
将路由添加到您的 routing.yml 文件
article: resource: "@PvesselArticleBundle/Controller" type: annotation
步骤 4: 更新数据库
为了使用此包,您必须更新您的数据库(如果您尚未使用,则需要创建一个)。
$ app/console doctrine:schema:update --dump-sql
步骤 5: 开启使用!
运行您的 Web 服务器和浏览器,尝试使用它!(使用 /article 路径开始)