You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Config files are automatically discovered whenever using the config() function that is always available.
I have a config file in my module_directory/Config.
In my library / model / controller, I'm trying to load my config file with config('IonAuth')
But it can't be load.
It works only if I put my config file in application/Config.
Thanks
CodeIgniter 4 version
The last develop version
Context
OS: LMDE 3
Web server : Apache on docker
PHP version : 7.1
The text was updated successfully, but these errors were encountered:
Where does the namespace point to? The way the scanning works is to look at the directory the namespace represents, like Modules/IonAuth and look for Config/{file}.php there. In this case that would be Modules/IonAuth/Config/{file}.php
If you including the package through Composer, the namespace would still have to be defined in application/Config/Autoload.php to work.
I think I hadn't understood well the documentation.
As you can see, I had code it like this : bvrignaud/CodeIgniter-Ion-Auth@72509bf
My first idea was to make something like this and if the final developer want to configure special settings, he have to duplicate the config file in the application/Config directory. And that doesn't works.
But, as I saw, we can set settings in .env file. So It's Ok.
I'm actually porting the Ion-Auth (3) to CI4.
You can have look to the wip here : https://github.com/bvrignaud/CodeIgniter-Ion-Auth/tree/4.
I'm based on Code Modules documentation.
As the documentation explain :
I have a config file in my module_directory/Config.
In my library / model / controller, I'm trying to load my config file with config('IonAuth')
But it can't be load.
It works only if I put my config file in application/Config.
Thanks
CodeIgniter 4 version
The last develop version
Context
The text was updated successfully, but these errors were encountered: