S
S
sl02019-06-16 22:30:02
symfony
sl0, 2019-06-16 22:30:02

How to properly configure routing in symfony 4?

Installed symfony demo and added FOSUserBundle to it. After that, the demo project does not open except for the homepage.

debug:route
produces strange:
admin_index                         GET        ANY      ANY    <href=>/{_locale}/admin/post/
  admin_post_index                    GET        ANY      ANY    <href=>/{_locale}/admin/post/
  admin_post_new                      GET|POST   ANY      ANY    <href=>/{_locale}/admin/post/new
  admin_post_show                     GET        ANY      ANY    <href=>/{_locale}/admin/post/{id}
  admin_post_edit                     GET|POST   ANY      ANY    <href=>/{_locale}/admin/post/{id}/edit
  admin_post_delete                   POST       ANY      ANY    <href=>/{_locale}/admin/post/{id}/delete
  blog_index                          GET        ANY      ANY    <href=>/{_locale}/blog/
  blog_rss                            GET        ANY      ANY    <href=>/{_locale}/blog/rss.xml
  blog_index_paginated                GET        ANY      ANY    <href=>/{_locale}/blog/page/{page}
  blog_post                           GET        ANY      ANY    <href=>/{_locale}/blog/posts/{slug}
  comment_new                         POST       ANY      ANY    <href=>/{_locale}/blog/comment/{postSlug}/new
  blog_search                         GET        ANY      ANY    <href=>/{_locale}/blog/search
  security_login                      ANY        ANY      ANY    <href=>/{_locale}/login
  security_logout                     ANY        ANY      ANY    <href=>/{_locale}/logout
  user_edit                           GET|POST   ANY      ANY    <href=>/{_locale}/profile/edit
  user_change_password                GET|POST   ANY      ANY    <href=>/{_locale}/profile/change-password
  easyadmin                           ANY        ANY      ANY    <href=>/admin/

Apparently because of this, everything does not work. But how it is and where it is added - I have no idea. There is nothing similar in controller annotations.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question