I have three models: Country.php
,Category.php
and Region.php
. All these models contains a common field named title
in database.
I want to extract the title
field from each model and create an array variable, so that I can run it in foreach
loop in my view.
What would be the optimal method to do so?