Undefined property: App\Controllers\Security_Controller::$Users_model |
hii, i have an error when load model in initController and extend baseController in other controller i cant access property in baseController the error say [size=1]Undefined property: App\Controllers\Security_Controller::$Users_model[/size]
in my baseController file : PHP Code: <?php PHP Code: <?php PHP Code: $this->$model = model("App\Models\\" . $model); What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(02-28-2022, 01:29 AM)InsiteFX Wrote: can't must use \\ [img]https://imgur.com/F3no4hd[/img] (02-27-2022, 04:58 PM)kenjis Wrote: See https://codeigniter4.github.io/userguide...components i don't know this is was the correct solution but i make __construct in baseController and extend baseController to other controller and in extended controller i make __construct and call parent::__construct(); |
Welcome Guest, Not a member yet? Register Sign In |