D.Richard
D.Richard

Reputation: 109

No route found for "GET /api" - NotFoundHttpException - ResourceNotFoundException

I'm currently working on a Symfony 3.3 project and I'm using different bundles:

I want to create a Symfony API to Angular, but I have the following problem:

This page

My routing.yml (#app/config/routing.yml) :

routing.yml

Can you help me, please?

good day :)

Upvotes: 1

Views: 4035

Answers (1)

Maksym  Moskvychev
Maksym Moskvychev

Reputation: 1674

This behaviour is absolutelly expected, as you do not have any controller, configured for path "/api".

You need to create a Controller, with path under "/api", for example, "/api/users" and then it will work.

"/api" is just a prefix for your API, so all your API URLs will start from it, but it does not mean that /api itself should work.

Upvotes: 2

Related Questions