devtime/raffler-bundle

Raffler backbonejs 框架示例。

安装: 290

依赖项: 0

建议者: 0

安全: 0

星星: 11

关注者: 3

分支: 2

开放问题: 0

语言:JavaScript

类型:symfony-bundle

v1.0.0 2013-04-21 22:21 UTC

This package is not auto-updated.

Last update: 2024-09-28 14:46:42 UTC


README

此包是一个简单的 backbone.js + Symfony2 应用程序,使用 https://github.com/gigo6000/DevtimeBackboneBundle 创建,它还使用了 Twitter bootstrap。

它允许您从一组名称中获取一个随机获胜者。

关注 @gigo6000 在 Twitter 上。 Tweet任何关于项目的疑问或建议。

您需要什么

此包需要 Symfony 2.1.1 或更高版本(它可能适用于较旧版本,但未经过测试)

安装

步骤 1: 使用 composer 下载 DevtimeRafflerBundle

将 DevtimeRafflerBundle 添加到您的 composer.json

{
    "require": {
        "devtime/raffler-bundle": "dev-master"
    }
}

现在运行以下命令来告诉 *composer 下载此包

$ php composer.phar update devtime/raffler-bundle

Composer 将安装包到您的项目 vendor/devtime 目录。

  • 注意:如果您还没有 Composer,请按照 http://getcomposer.org/ 上的说明下载,或直接运行以下命令
curl -s https://getcomposer.org/installer | php 

步骤 2: 启用包

在内核中启用该包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Devtime\Bundle\RafflerBundle\DevtimeRafflerBundle(),
    );
}

步骤 2: 导入路由

通过将以下代码添加到应用程序的路由文件中,导入包的路由

# app/config/routing.yml

devtime_raffler:
    resource: "@DevtimeRafflerBundle/Controller/"
    type:     annotation
    prefix:   /  

步骤 3: 发布包资源

之后,您需要将资源(发布)安装到 web 目录。

php app/console assets:install

此时,您应该能够在应用程序中看到: http://yoursite.local/raffler