adamwjtk/some-example-bundles

homework project

dev-master 2018-08-10 09:03 UTC

This package is not auto-updated.

Last update: 2024-11-20 11:45:48 UTC


README

1 - Install the bundle

composer require adamwjtk/some-example-bundles dev-master

2 - Enable the bundles in the kernel:

    public function registerBundles()
    {
        $bundles = [

            new \AdamwjtkProductBundle\AdamwjtkProductBundle(),
            new \AdamwjtkClientBundle\AdamwjtkClientBundle(),
            
        ];

3 - register the routes

# app/config/routing.yml

adamwjtk_client:
    resource: "@AdamwjtkClientBundle/Resources/config/routing.yml"
    prefix: /client

adamwjtk_product:
    resource: "@AdamwjtkProductBundle/Resources/config/routing.yml"
    prefix:   /api/v1/product

4 - register services

# app/config/services.yml


    AdamwjtkProductBundle\:
        resource: '../../vendor/adamwjtk/some-example-bundles/src/Adamwjtk/ProductBundle/*'
        exclude: '../../vendor/adamwjtk/some-example-bundles/src/Adamwjtk/ProductBundle/{Entity,Repository,Tests}'
# app/config/config.yml
imports:

    - { resource: "@AdamwjtkProductBundle/Resources/config/services.yml"} 

5 - move assets from \vendor\adamwjtk\some-example-bundles\src\Adamwjtk\ClientBundle\Resources\public to \web and set up config.yml like this :

twig:
    //.....
    form_themes:
      - bootstrap_3_layout.html.twig

6 - update db

  php bin/console doctrine:schema:update --force

7 - run

{your.domain}/app_dev.php/client/list