Commit d918827d authored by Mat's avatar Mat

génère un nouveau APIBundle

* php bin/console generate:bundle
* composer.phar dumpautoload
* rm DefaultController.php et views/Default/index.html.twig
* vide le fichier routing
parent 854622e4
......@@ -18,6 +18,7 @@ class AppKernel extends Kernel
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new PotageBundle\PotageBundle(),
new FOS\UserBundle\FOSUserBundle(),
new APIBundle\APIBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
......
......@@ -3,6 +3,7 @@ imports:
- { resource: security.yml }
- { resource: services.yml }
- { resource: "@PotageBundle/Resources/config/services.yml" }
- { resource: "@APIBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
......
api:
resource: "@APIBundle/Resources/config/routing.yml"
prefix: /API/v1
potage:
resource: "@PotageBundle/Resources/config/routing.yml"
prefix: /
fos_user:
resource: "@FOSUserBundle/Resources/config/routing/all.xml"
prefix: /user
\ No newline at end of file
prefix: /user
......@@ -4,6 +4,7 @@
"type": "project",
"autoload": {
"psr-4": {
"APIBundle\\": "src/APIBundle",
"PotageBundle\\": "src/PotageBundle"
},
"classmap": [
......
<?php
namespace APIBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class APIBundle extends Bundle
{
}
services:
# api.example:
# class: APIBundle\Example
# arguments: ["@service_id", "plain_value", "%parameter%"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment