G
G
gitdev2021-01-29 20:05:54
symfony
gitdev, 2021-01-29 20:05:54

Do I need to generate a separate bundle for Api in Symfony 5.2?

There is an API for a couple of chat controllers. Do I need to generate an Api bundle or create an Api folder in the Controller folder

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2021-01-29
@gitdev

Why do you need a bundle? Are you planning to connect this code somewhere in another application? A bundle is essentially an integration of your code with a symphony application.
Create an API folder and put it there. You can also make a separate application. You decide.
Quoting from the documentation:

In versions of Symfony prior to 4.0, it was recommended to organize native application code using packages. This is no longer recommended and packages should only be used to share code and functionality between multiple applications.
The package is similar to a plugin in other software, but even better. The main features of the Symfony framework are implemented using bundles (FrameworkBundle, SecurityBundle, DebugBundle, etc.) They are also used to add new functionality to your application using third party bundles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question