n-sens / contact-bundle
联系表单插件
1.1.1
2016-10-16 20:13 UTC
Requires
- php: >=5.3.0
- doctrine/doctrine-bundle: *
- symfony/config: >=2.1
- symfony/framework-bundle: >=2.5.6
- symfony/http-foundation: >=2.1
- twig/twig: *
This package is not auto-updated.
Last update: 2024-09-28 17:49:22 UTC
README
步骤 1: 下载插件
打开命令行控制台,进入你的项目目录,并执行以下命令以下载此插件的最新稳定版本
$ composer require n-sens/contact-bundle "~1"
此命令需要您全局安装了Composer,具体请参考Composer文档中的安装章节。
步骤 2: 启用插件
然后,通过将插件添加到项目中 app/AppKernel.php
文件中注册的插件列表来启用该插件
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new NS\ContactBundle\NSContactBundle(), ); // ... } // ... }
$ php app/console doctrine:schema:update --force
步骤 3: 配置
# config.yml # NSContactBundle Configuration ns_contact: subject: Message de contact emailto: mohand@n-sens.com sender_name: Application template: NSContactBundle:Emails:template.html.twig disable_delivery: false success_url: ns_contact
# routing.yml # NSContactBundle Routes ns_contact: resource: "@NSContactBundle/Resources/config/routing.yml" prefix: /