What's the best way to get data from various models within my layout file(main.php to use in footer). For example, I want my footer to always contain 5 records from my products model/table.
So I have two questions:
- How can I display data within a layout/common component file?
- When only wanting five records would this be done within a model function or in my view foreach loop?