![]() |
Phpstorm $this->model_name->method() highlighted - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Phpstorm $this->model_name->method() highlighted (/showthread.php?tid=73045) |
Phpstorm $this->model_name->method() highlighted - stoyo - 03-13-2019 Hello, i am new with CodeIgniter so i started to read the docs, specially in the "Model" section there is a code: $this->load->model('model_name'); $this->model_name->method(); I downloaded Phpstorm Codeigniter plugin and Codeigniter Snippets plugin.But there is still a problem with the code above, when i type: $this->model_name - it gets highlighted so it is not found and i cant get autocomplete for the methods in the model class. Should i put some Phpdoc annotation ? RE: Phpstorm $this->model_name->method() highlighted - badger - 03-13-2019 at the start of your controller class put phpdoc like this PHP Code: /** RE: Phpstorm $this->model_name->method() highlighted - salain - 03-13-2019 Hi, Solution Here RE: Phpstorm $this->model_name->method() highlighted - stoyo - 03-13-2019 Thanks to both of you, but now the other problem are the variables passed to the view: Controller: PHP Code: $data['curr_url'] = current_url(); View: PHP Code: /** It highlights the $curr_url and it says that there is no "__toString" method in Main controller class. |