Best practice is to use the model within your controller to get the data you need, and pass it to the view. It is usually recommended to keep as little function calling out of the views. They should be just for display purposes with as little logic as possible.