Welcome Guest, Not a member yet? Register   Sign In
Accessing models from multiple controllers for dummies
#1

[eluser]Tillman Mosley III[/eluser]
Or Accessing multiple models from a single controller for dummies

I'm pretty new to PHP and to CodeIgniter, so I was just trying to either get some validation on where my thoughts are or where I should be heading towards.

I attached a pic of an app I've scavenged together from bits of code from other CI applications. I have it to where you log in and you get sent to a dashboard that displays some overall information on the system. (The system is supposed to be a request for quote system) That information is displayed in for separate boxes and right now they are all separate views.

I'm not really sure if I'm thinking right that I should have each method that I want to reference just in the model that it belongs to or should I have it in some sort of helper/library. The information in the boxes could possibly be referenced some other place in the application. I probably should have worked on that before the view but I wanted to at least get something visual up.

I'm also using Matchbox, if that helps any
#2

[eluser]wiredesignz[/eluser]
That looks like a job for Modular Extensions, where each View partial has its own MVC triad.

But, without using ME you would load each Model from application Models, and pass appropriate data to each View part.

You could use libraries or helpers but that just adds more overhead.
#3

[eluser]Tillman Mosley III[/eluser]
Thanks, I just read the wiki for Modular Extensions and it all makes sense now.




Theme © iAndrew 2016 - Forum software by © MyBB