Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. imports:
  2. - { resource: parameters.yml }
  3. - { resource: security.yml }
  4. - { resource: services.yml }
  5. - { resource: "@CarBundle/Resources/config/services.yml" }
  6.  
  7. # Put parameters here that don't need to change on each machine where the app is deployed
  8. # http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  9. parameters:
  10. locale: en
  11.  
  12. framework:
  13. #esi: ~
  14. translator: { fallbacks: [en] }
  15. secret: "%secret%"
  16. router:
  17. resource: "%kernel.root_dir%/config/routing.yml"
  18. strict_requirements: ~
  19. form: ~
  20. csrf_protection: ~
  21. validation: { enable_annotations: true }
  22. #serializer: { enable_annotations: true }
  23. templating:
  24. engines: ['twig']
  25. default_locale: "%locale%"
  26. trusted_hosts: ~
  27. trusted_proxies: ~
  28. session:
  29. # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
  30. handler_id: session.handler.native_file
  31. save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%"
  32. fragments: ~
  33. http_method_override: true
  34. assets: ~
  35. php_errors:
  36. log: true
  37.  
  38. # Twig Configuration
  39. twig:
  40. debug: "%kernel.debug%"
  41. strict_variables: "%kernel.debug%"
  42. form_themes:
  43. - 'bootstrap_3_layout.html.twig'
  44.  
  45. # Doctrine Configuration
  46. doctrine:
  47. dbal:
  48. driver: pdo_mysql
  49. host: "%database_host%"
  50. port: "%database_port%"
  51. dbname: "%database_name%"
  52. user: "%database_user%"
  53. password: "%database_password%"
  54. charset: UTF8
  55. # if using pdo_sqlite as your database driver:
  56. # 1. add the path in parameters.yml
  57. # e.g. database_path: "%kernel.root_dir%/../var/data/data.sqlite"
  58. # 2. Uncomment database_path in parameters.yml.dist
  59. # 3. Uncomment next line:
  60. #path: "%database_path%"
  61.  
  62. orm:
  63. auto_generate_proxy_classes: "%kernel.debug%"
  64. naming_strategy: doctrine.orm.naming_strategy.underscore
  65. auto_mapping: true
  66.  
  67. # Swiftmailer Configuration
  68. swiftmailer:
  69. transport: "%mailer_transport%"
  70. host: "%mailer_host%"
  71. username: "%mailer_user%"
  72. password: "%mailer_password%"
  73. spool: { type: memory }
  74.  
  75. app:
  76. resource: "@AppBundle/Controller/"
  77. type: annotation
  78. car:
  79. resource: "@CarBundle/Controller/"
  80. type: annotation
  81.  
  82. <?php
  83.  
  84. /**
  85. * Handles login operations
  86. */
  87.  
  88. namespace AppBundleController;
  89.  
  90. use AppBundleEntityUser;
  91. use SensioBundleFrameworkExtraBundleConfigurationRoute;
  92. use SymfonyBundleFrameworkBundleControllerController;
  93. use SymfonyComponentHttpFoundationRequest;
  94. use SymfonyComponentHttpFoundationSessionSession;
  95. use function dump;
  96.  
  97. class SecurityController extends Controller
  98. {
  99. /**
  100. * @Route("/login", name="login")
  101. */
  102. public function loginAction(Request $request)
  103. {
  104. // here we are getting a service from the container
  105. $authenticationUtils = $this->get('security.authentication_utils');
  106.  
  107. // get the login error if there is one
  108. $error = $authenticationUtils->getLastAuthenticationError();
  109.  
  110. // last username entered by the user
  111. $lastUsername = $authenticationUtils->getLastUsername();
  112.  
  113. return $this->render('security/login.html.twig', array(
  114. 'last_username' => $lastUsername,
  115. 'error' => $error,
  116.  
  117. ));
  118. }
  119. }
  120.  
  121. Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: "No route found for "GET /login/" (from "http://localhost:8000/register")" at C:xampphtdocsphpframeworkssymfonyautotradervarcachedevclasses.php line 3487
  122.  
  123. Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: "No route found for "GET /login/" (from "http://localhost:8000/")" at C:xampphtdocsphpframeworkssymfonyautotradervarcachedevclasses.php line 3487
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement