Use multi extend Model |
Hello
I can extend my favorite Model with use My_Model in core folder But i can use one model only,while i need model for each section of my project Example core/My_Model core/User_Model core/Galelry_Model Maybe?
You can do it this way:
core/My_model core/My_user_model core/My_gallery_model
Hi,
I use only one file : MY_Model.php and inside I have all the main model I want : PHP Code: class MY_Model extends CI_Model (08-30-2017, 02:29 AM)omid_student Wrote: Hello All you have to do is add your new models in model folder and extends MY_Model instead of CI_Model no need to put new model in core folder Code: class User extends MY_model
Rule of CodeIgniter:
CodeIgniter ./system/core go into ./application/core CodeIgniter ./system/libraries go into ./application/libraries -------------------------------------------------------------- So in your case MY_Model goes into ./application/core Your models extended from the MY_Model: Go into the ./application/models Hope that helps. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |