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.
- Add Api permissions from your apps or components
- How to send email in Midrub and how understand why you're emails aren't sending
- How works the Quick Scheduler to publish posts with several clicks
- How to create a new menu for the user's panel
- the_db_request in midrub frontend themes
- Midrub Core Introduction
- Midrub User Introduction
- How to enable or disable apps and components for a Team's member
- Midrub Apps Structure
- Midrub Team Introduction