-1

In advanced-app i create new module api (just copy backend).

enter image description here

And fix route in OpenServer:

enter image description here

Set RestApi Settings like this: https://www.yiiframework.com/doc/guide/2.0/en/rest-quick-start

But for url http://api/users I get 404

How fix it?

Git link: https://github.com/triest/Insigne/tree/master/api

Muhammad Omer Aslam
  • 22,976
  • 9
  • 42
  • 68
triest23
  • 1
  • 4
  • You messed up something with namespaces. Why you're using `backend` namespace for API? – rob006 Jan 21 '19 at 11:14
  • try accessing api/robots.txt. You should see the content, if it does not work then something is set up in the wrong way on your server. Also is the 404 error an Yii2 error or a normal server error. This could actually tell us a lot. – Mihai P. Jan 22 '19 at 22:36

1 Answers1

-1

In config/main.php need fix 'controllerNamespace'

triest23
  • 1
  • 4