Hello, new to the forums.
The company I work for currently uses CodeIgniter 3.x. One of our projects is somewhat of a whitelabel with a shared code base.
We currently use add_package_path() to load views/helpers/configs/constants/etc. on a per whitelabel (site) basis. You get the picture.
We extend CI_Controller like so:
PHP Code:
class US_Controller extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->add_package_path( APPPATH . "sites/" . SITE_NAME);
}
}
In this example, when loading a view, it first looks for the view in the 'sites/' path and loads the view if it exists there. If not found, it looks for the view in the normal views/ directory and loads that as the fallback (like a global/common view).
TLDR:
Is anything like this possible in CodeIgniter 4? I realize there are namespaces, but we're looking to just
Code:
echo view('viewFile')
as usual without specifying anyting extra/special every time. Is there a similar way to extend the CI loader? Anything? Just now starting to dive into CI4, so pardon my ignorance in advance