Example - Model

According to figure below, showValue is a function declared in Model. In this function, there are data assignment of greet, data assignment of Stage and data assignment of Loop. All the data are stored in object array($data) and returned to View.

Sample Function in Model