Undefined variable: config in Model |
I use code in Model:
PHP Code: $encrypter = \Config\Services::encrypter($config);
It's telling you that your $config variable is not defined.
PHP Code: public $config = ''; So to fix you need to define $config in your code. Then you code would look like this PHP Code: $encrypter = \Config\Services::encrypter($this->config); Unless this is in a method then you would just assign a value to $config. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Why does code works without declaration of variable $config into Controller, but it doesn't work into Model? I don't search decision. I need explanation.
|
Welcome Guest, Not a member yet? Register Sign In |