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 enable or disable the widgets in the Midrub Dashboard Component
- How to create and use coupons codes in Midrub
- How works the referral program in Midrub
- How to configure the affiliate program in Midrub
- How works 3D secure for Braintree payments
- How to create and use the Stripe's webhooks
- How to manage the subscriptions on Braintree
- Send automatic templates in Facebook Messenger
- Apply coupons codes for the plan upgrade or renew
- How works the fields and options in the Midrub Payments system