Welcome Guest, Not a member yet? Register   Sign In
Template data title from db
#1

Hi in my project i use a template .
Wich is the best way to set tag title getting data from db , i would be set in only one function  (not in every controller set $data['title'] = .... )? 
Must i use base controller to do this ?
Reply
#2

BaseController makes sense to me. Add a protected var and assign it a value in initController(). Then you can change the value in any other controller as needed.
Reply
#3

You could also use CodeIgniters Settings.
Provides database storage and retrieval of application settings, with a fallback to the config classes.

CodeIgniter 4 Settings
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB