Welcome Guest, Not a member yet? Register   Sign In
Best model practise
#2

[eluser]cartalot[/eluser]
if you have an author model, then you could have one method to return the author name based on id,
and then you can call that wherever you want. Not sure if its considered cool, but Models can call other model methods
- its exactly the same as the controller, just load the model in the constructor and then call like,
$authorname = $this->author_model->getName($id) ;


Messages In This Thread
Best model practise - by El Forum - 11-18-2012, 04:00 AM
Best model practise - by El Forum - 11-19-2012, 02:14 PM
Best model practise - by El Forum - 11-19-2012, 10:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB