Problem with $this in child Class extend of MX_Controllers |
As I can see the object $this->auth really isn't recognized by Login class. Where is this object, on Base.php?
If this object is from other controller or lib I recommend create an lib or helper and subsequetly create a superglobal. On my latest project based on CI3 I have a superglobal ci that's instancied on BaseController, like this: PHP Code: class BaseController extends CI_Controller Then I can use $this->ci->panel to show "abc" where I want: controller or views. (it's necessary running Global with part of autoloader) |
Messages In This Thread |
Problem with $this in child Class extend of MX_Controllers - by avidal - 01-31-2020, 10:58 AM
RE: Problem with $this in child Class extend of MX_Controllers - by ajmeireles - 02-01-2020, 04:14 AM
RE: Problem with $this in child Class extend of MX_Controllers - by avidal - 02-01-2020, 11:20 AM
RE: Problem with $this in child Class extend of MX_Controllers - by InsiteFX - 02-01-2020, 04:24 AM
|