Welcome Guest, Not a member yet? Register   Sign In
SOLVED: CI 4.0.2 and subdirectories
#4

(03-13-2020, 08:14 AM)InsiteFX Wrote: You need to namespace all folders and sub-folders.

If in the Controllers directory then:
PHP Code:
<?php
namespace App\Controllers

If the Controller is in a sub directory:
PHP Code:
<?php
namespace App\Controllers\sub-directory

When extending or using a Controller from a sub directory:
PHP Code:
use App\Controllers\sub-directory 

Please, add it info in documentation:  https://codeigniter4.github.io/userguide...controller
Reply


Messages In This Thread
SOLVED: CI 4.0.2 and subdirectories - by mariofix - 03-12-2020, 02:35 PM
RE: CI 4.0.2 and subdirectories - by Bennito254 - 03-13-2020, 05:39 AM
RE: CI 4.0.2 and subdirectories - by InsiteFX - 03-13-2020, 08:14 AM
RE: CI 4.0.2 and subdirectories - by juancarlosv - 04-03-2020, 10:23 AM
RE: CI 4.0.2 and subdirectories - by mariofix - 04-12-2020, 02:12 PM
RE: CI 4.0.2 and subdirectories - by anmar_dev - 04-03-2020, 05:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB