How to change the CodeIgniter default models locations
Please stay away from my models! Don't use them for your apps, components, plugins or themes because i can change them in a day. If you want to use the database in your apps, components, plugins or themes, please create your own models.
If you want to create a model, create the directory models in your plugin, theme, component or app. Then you have to know the path of your plugin, theme, component or app.
If you know the path, before call a model's method, use this:
// Get codeigniter object instance $CI =& get_instance(); // Load Base Model $CI->load->ext_model( YOUR_PATH . 'models/', 'Your_model', 'your_model' );
As you can see, first parameter is the PATH, second is the model's class and third is the name used to call the model:
In this way you can use the models wherever you want.
- How to change the CodeIgniter default models locations
- How to force url redirect from http to https with htaccess
- Add analytics code in the Midrub Frontend Themes
- How to add the analytics code or chat support in the user dashboard
- Find the Midrub version
- How to create a Terms and Services page in Midrub