Hi there I have a Phalcon MVC APi and have some php class that check for API version in URL and returns the correct one My folder structure looks like this:
├───app
│ ├───api
│ └───v1
│ ├───config
│ ├───controllers
│ ├───library
│ │ ├───Http
│ │ │ ├───Client
│ │ │ │ └───Provider
│ │ │ ├───Request
│ │ │ └───Response
│ │ └───PushService
│ │ ├───ApplePush
│ │ └───Payloads
│ ├───logs
│ ├───migrations
│ ├───models
│ │ └───Db
│ ├───services
│ └───views
│ ├───index
│ └───layouts
├───cache
├───public
│ ├───css
│ ├───files
│ ├───img
│ ├───js
│ └───temp
└───vendor
but basicly what you put inside app folder you put inside api/v1 folder here and my php script then based on url finds the right api although everything (controllers) gets loaded fine, router is givimg me problems
if I acsess url like: https://test.api/v1/somecontroller/someaction router picks v1 as controller instead of picking somecontroller
so is there a way to set a prefix to tell router to start treating controllers after v1 part?, while still maintaing convinience of not neading to define every route (as controllers are picked from controllers folder automaticly)
Thanks for Anwsering and Best Regards