2017 © Pedro Peláez
 

symfony-bundle slotbundle

A bundle filled with Slot

image

ais/slotbundle

A bundle filled with Slot

  • Monday, January 11, 2016
  • by theredfoxfire
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ais-slot-bundle

slot Bundle For AIS. I use Symfony 2.7.4 in my kit. In case if you want to install Symfony follow the URL below:, (*1)

Symfony 2.7, (*2)

Usage

I assume you already have composer on your dev environment. If not, please visit this URL:, (*3)

Getting started with Composer, (*4)

Add the following inside require tag in your root composer.json file:, (*5)

{
    "require": {
      "ais/slotbundle" : "dev-master"
    },
}

Run composer update, and wait until composer update is finished., (*6)

php composer.phar update

Registering the bundle into your AppKernel.php, (*7)

Once the composer update is finished. If you not yet install NelmioApiDocBundle before, you need registering it too., (*8)

Because this bundle require NelmioApiDocBundle to see the API doc. I also use JMS Serializer and FOSRestBundle., (*9)

<?php
// app/AppKernel.php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
        ...
            new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
            new FOS\RestBundle\FOSRestBundle(),
            new JMS\SerializerBundle\JMSSerializerBundle(),
            new Ais\SlotBundle\AisSlotBundle(),
        );
        ...

        return $bundles;
    }
}

Import the route to your app/config/routing.yml, (*10)

  ais_slots:
    type: rest
    prefix: /api
    resource: "@AisSlotBundle/Resources/config/routes.yml"

  NelmioApiDocBundle:
    resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
    prefix:   /api/doc

See what in the inside

Now you may see the available API by access your url dev, (*11)

ex: http://localhost/web/app_dev.php/api/doc

Find a typo? just ask me for PR. If you find some error please help me to fix it by email me to vizzlearn@gmail.com, (*12)

The Versions