Welcome Guest, Not a member yet? Register   Sign In
Nested Model files?
#1

[eluser]Matalina[/eluser]
The user guide says I can nest model files in folders, I can just call them like normal?
#2

[eluser]Aken[/eluser]
Call them like normal, just make sure to include the directory structure.

If your model is located in application/models/subfolder/mymodel.php, then:

Code:
$this->load->model('subfolder/mymodel');
#3

[eluser]Matalina[/eluser]
Thanks. Much appreciated.
#4

[eluser]CroNiX[/eluser]
Same with views or libraries or anything else that uses the load() method.
#5

[eluser]Matalina[/eluser]
I was more asking how to use the model after I used it. Loading and such didn't seem an issue to me, as I knew I could do that with others. I was more concerned about after I had loaded. Just making sure I didn't have to include the directory, but then again thinking about it now it seems silly cause it's the class being used not the actual file.

But Thanks for the replies they were helpful.




Theme © iAndrew 2016 - Forum software by © MyBB