How to use public variables from controller in views in CI 4 |
Like John_Betong suggested, extend the base controller. What I like to do is something like this:
PHP Code: class BaseController extends Controller Then in my controllers I add some other data specific to that controller/method: PHP Code: class SomeController extends BaseController
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Welcome Guest, Not a member yet? Register Sign In |