-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can i add some model in it? #1
Comments
Yes. Just add something like: /**
* Class Profile
* @property General_model $general
* @property Profile_model $profile
*/
class Profile extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('general_model', 'general');
$this->load->model('profile_model', 'profile');
}
public function index()
{
// Settings from General_model
$data['settings'] = $this->general->get_settings();
...
} |
This file too works in Netbeans if do you want. :) |
thanks!it work very well!!! |
Brilliant, thank you! |
Awesome! @natanfelles I think you should include this in README.md. |
And if you extend a Model (like User_Model) from another model, like MY_Model, you just write something like:
Now PHP Storm can assist you with your functions from MY_Model when you write code in the User controller. |
# can my model can be showed by adding my model property in the file?
The text was updated successfully, but these errors were encountered: