Questions tagged [symfony-routing]

Routing in Symfony Framework's MVC implementation. Symfony is a free, open source PHP web application framework, and it is released under the MIT license.

symfony-routing is a tag suitable for any questions regarding routing in Symfony's MVC implementation, url handling, or any other matter affecting or affected by routing in Symfony.

196 questions
0
votes
1 answer

filter list of items symfony

I am building a web application where a user make a post. the post includes category and location. i can view posts for the categories and locations seprately. What i am trying to do is to filter the view to list only category list from a location.…
Suleiman
  • 21
  • 1
  • 7
0
votes
1 answer

Redirecting based on current url in symfony

I've got a symfony 2 application with 3 different roles: Admin, Vendor, and User. All three of these users should have different login pages. What I'm struggling with is figuring out what to put in the security.yml to get unauthenticated…
Jake Sylvestre
  • 936
  • 3
  • 14
  • 39
0
votes
2 answers

No route found for "GET /sf/customer-first-progam-level"

As title shows I am having that issue if I try to reach the following URL: http://app.local/sf/customer-first-progam-level This is what I have: app/routing.yml quote: resource: "@QuoteBundle/Controller/" type: annotation prefix: …
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
0
votes
2 answers

Symfony3 routing not working with web root configuration

I am trying to integrate some new Symfony3 apps into an existing web space. At my webroot /html, each app has it's own directory. Each of these apps could be anything- cakePHP, custom PHP, whatever. And each are accessed by a URL like…
Amy Lashley
  • 416
  • 4
  • 11
0
votes
0 answers

Get the user in a RouteProviderInterface implementation

Is it possible to get the user in a RouteProviderInterface implementation? My RouteProviderInterface implementation loads a number of new Routes, nothing special. But I want to customize the Routes based on a user setting, if a user is logged in. If…
BigJ
  • 1,990
  • 2
  • 29
  • 47
0
votes
2 answers

How can I add simple CMS functionality to existing Symfony application

I have an existing web application accessing a MySQL database. I'm porting this application to Symfony. The new application has to use the old database, as we cannot port the whole application at once, i.e. the old and the new application are…
fishbone
  • 3,140
  • 2
  • 37
  • 50
0
votes
1 answer

Have Apache handle requests if file exists, otherwise route it through Symfony front controller

I have a very legacy php application, that I'm trying to update to Symfony. The application currently has a structure similar to this: /www <-current web root php_page1.php php_page2.php php_pagen.php /dashboard …
mcmurphy
  • 781
  • 16
  • 30
0
votes
2 answers

Symfony 3 routing with slug. Route with last slash without slug shows 404 page

I've started using Symfony. I was trying to set up routing with slugs and had a problem. When I enter no slug and no last slash site.me/lucky/number it's ok. But when I enter no slug with lash slash site.me/lucky/number/ I get 404 page. I found a…
0
votes
1 answer

symfony routing, use value from Request as default

I've got the following route definition my_route: path: /actual-path/ defaults: _controller: MyBundle:MyController:detail id: application_id requirements: methods: GET …
DoppyNL
  • 1,415
  • 1
  • 14
  • 24
0
votes
1 answer

Symfony 2.8 SyliusRecourceBundle routing criteria

Right now I have a strange issue. Recently I started developing in Symfony 2.8. To learn in this framework I made an own project with an API. Everything works until i face a Route with a Criteria. According to the documentation I only need to add…
ItsJohnB
  • 71
  • 7
0
votes
1 answer

setting a default locale

I'm trying to implement the locale in the routes. I can get it to work like host/en/page & host/fr/page with this snippet: #routing.yml app: resource: "@AppBundle/Controller/" type: annotation prefix: /{_locale} requirements: …
SnelleJelle
  • 933
  • 5
  • 18
  • 35
0
votes
2 answers

What should be edited in routing.yml in symfony 3 to create a new route from annotation?

I am quite new to Symfony 3. I created the controller files in the AppBundle itself. No new bundle created. Now I am trying to route a new page and it gives an error. This is what I did. In…
njay
  • 79
  • 10
0
votes
0 answers

Order of Route in Symfony

I Use Symfony 3, And I Want to understand How symfony chouses the Route. I have 3 routes, 2 in routing.yml and 1 in annotation. this is my code: app/config/routing.yml app: resource: "@AppBundle/Controller/" type: annotation hello: …
monkeyUser
  • 4,301
  • 7
  • 46
  • 95
0
votes
1 answer

Use routing and controllers from another bundle on Symfony2

I am using a Custom Bundle built by me and I have installed FOSUserBundle. Inside my bundle I have UserEntity which has its Controller and it's routing with the prefix: /admin/user. I want the route admin_user_show to get the action from the…
Xhens
  • 804
  • 3
  • 13
  • 33
0
votes
1 answer

FOSUserbundle login form not redirecting to route

I'm using FOSUserBundle and i want to redirect users to homepage after login. I'm using annotations to define my routes and i have named my homepage route "homepage". However, i get the error "no route found for homepage" after login. When i remove…
ss_millionaire
  • 429
  • 2
  • 7
  • 22