Category: routes

how to properly name the route in Symfony3

The current code doesn’t work. When I remove name=”bazarHome” from the route, it works fine! so my question is how to correctly name the route? here is the code of my controller : <?php namespace BazarBundleController; use SymfonyBundleFrameworkBundleControllerController; use SensioBundleFrameworkExtraBundleConfigurationRoute;…

Can i use Symfony’s Route Annotation in Non-Symfony Project

I already tried things here https://symfony.com/doc/master/components/routing.html But i couldn’t make it. <?php use DoctrineCommonAnnotationsAnnotationReader; use SymfonyBundleFrameworkBundleRoutingAnnotatedRouteControllerLoader; use SymfonyComponentConfigFileLocator; use SymfonyComponentRoutingLoaderAnnotationDirectoryLoader; use ComposerAutoloadClassLoader; use DoctrineCommonAnnotationsAnnotationRegistry; /** @var ClassLoader $loader */ $loader = require __DIR__.’/vendor/autoload.php’; AnnotationRegistry::registerLoader([$loader, ‘loadClass’]); $loader = new AnnotationDirectoryLoader( new…