View Data
Passing Data To Views
As you saw in the previous examples, you may easily pass an array of data to views:
When passing information in this manner, $data should be an array with key/value pairs. Inside your view, you can then access each value using its corresponding key, such as . As an alternative to passing a complete array of data to the view helper function, you may use the with method to add individual pieces of data to the view: