CodeIgniter Forums
Do not autoload database to controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Do not autoload database to controller (/showthread.php?tid=88673)



Do not autoload database to controller - ElTomTom - 10-16-2023

I have several controllers in my project that use the database, because of this, my autoload.php file has the database resource inserted for libraries.
Code:
$autoload['libraries'] = array('database', 'parser', 'encryption');

However, there is only one controller that does not need to connect to the database.
Is it possible to just not load the database when using this specific controller?