Cant get namespaces to work, need help #15315
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hello, you can check this x2 demo projects as reference. |
Beta Was this translation helpful? Give feedback.
-
It's been a while but I wanted to add a quick answer for future reference. Your controllers' namespace is In this case all you need to register is the
|
Beta Was this translation helpful? Give feedback.
It's been a while but I wanted to add a quick answer for future reference.
Your controllers' namespace is
App/Controllers
and it is located inapp/controllers
directory.Similarly, your models will have
App/Models
namespace and will be located inapp/models
.In this case all you need to register is the
App
Namespace toAPP_PATH
. Each namespace that begins withApp\
will be mapped with directory names. In other words, each class file under app directory and its subdirectories will be expected to have relatively mapped directory names as namespace (of course camel case).