Giter VIP home page Giter VIP logo

simplelotterybundle's Introduction

SimpleLotteryBundle Installation

This is a Test bundle to test the power of the symfony framework.

This bundle provides:

  • A Form to persist in the database a nickname.
  • A Random Lottery raffle that show the winner.

There is an example of the project on-line in: http://lottery.feerb.com/

Prerequisites

This version of the bundle requires Symfony 2.8.

Install Symfony

If you are starting a new project you need install symfony standard, if you already have a symfony project go to next step.

If you arent install symfony yet you need to read symfony install documentation

Install the bundle

Add this bundle into src/ folder

Enable the Bundle

Enable the SimpleLotteryBundle bundle in your AppKernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new SimpleLotteryBundle\SimpleLotteryBundle(),
    );
}

Update your database schema

Configure your database

Fist, if you aren't configured your database you need to read symfony database documentation.

Your parameters should looks like this.

# app/config/parameters.yml
parameters:
    database_driver: pdo_mysql
    database_host: 127.0.0.1
    database_port: null
    database_name: blog_bundle_dev
    database_user: myUser
    database_password: myPass
    locale: en
    secret: ThisTokenIsNotSoSecretChangeIt

Update schema

Now that the bundle is configured, the last thing you need to do is update your database schema.

run following command.

$ php doctrine:schema:update --dump-sql

It will show the changes that will be made ​​in the database, if everything is correct then you can execute.

$ php doctrine:schema:update --force

simplelotterybundle's People

Contributors

ferranriera avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.