Your project controllers should only contains actions as public methods 2
- Read doc
- Productivity
- Major
More information: https://insight.symfony.com/what-we-analyse/symfony.controller.non_action_public_method_in_controller_class
- use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
- #[Route(path: '/favicon', name: 'enabel_layout_favicon_')]
- class FaviconController extends AbstractController
- {
- #[Route(
- path: '/site.webmanifest',
- name: 'webmanifest',
- methods: 'GET',
- defaults: [
- '_format' => 'json',
- 'url' => $this->generateUrl('homepage', [], UrlGeneratorInterface::ABSOLUTE_URL),
- ],
- ]);
- }
- #[Route(
- path: '/browserconfig.xml',
- name: 'browserconfig',
- methods: 'GET',
- defaults: [
- '_format' => 'xml',
damienlagae
damienlagae
damienlagae