A controller in Symfony is a PHP callable (a function, a method on an object, or a closure) that receives an HTTP request and returns an HTTP response. An HTTP response can contain anything: an HTML page, a JSON string, a file download, etc.
In order to tell Symfony which controller should handle a certain request, you need to configure a route.
route_name
with a placeholderControllers should be small and focus on handling HTTP requests: the actual business logic of your application should be delegated to different parts of your application, for instance your domain model.