Codeigniter docs correction - routing |
I think that the following statement contained in the docs here https://www.codeigniter.com/user_guide/i...ble-syntax
If you forget to add `use App\Controllers\Home;`, the controller classname is interpreted as `Config\Home`, not `App\Controllers\Home` because **app/Config/Routes.php** has `namespace Config;` at the top. is not valid anymore with the latest codeigniter version since Routes.php does not have the mentioned namespace. I find that it indeed is interpreted as App\Controllers unfortunately I was not able to find the docs repo in GitHub to contribute. I would like to know how to contribute with Codeigniter's documentation... Regards.
Yes, now Routes.php does not have any namespace. That is in a global space.
> I find that it indeed is interpreted as App\Controllers No, it is interpreted as \. PHP Code: $routes->get('/', [Home::class, 'index']); Quote:+--------+-------+------+--------------+----------------+---------------+ (10-11-2023, 05:45 AM)bgeneto Wrote: unfortunately I was not able to find the docs repo in GitHub to contribute. I would like to know how to contribute with Codeigniter's documentation... It is the main repository. https://github.com/codeigniter4/CodeIgniter4 Also, you can create a PR from the "Edit this page" button in the upper right corner. https://codeigniter4.github.io/CodeIgnit...uting.html |
Welcome Guest, Not a member yet? Register Sign In |