how to use table gateway or database in view helper zend 2


last time i wrote about tutorial how to create view helper in zend framework 2. now i am going to share how to use model table gateway in view helper. i will use the code in last tutorial that mentioned before so you have to look this tutorial create view helper in zend framework 2 to follow this tutorial.

1. Edit your Foohelper.php

2. Edit your module.php ( passing service manager to view helper )


Done…. good luck and happy working… ;)

Tags : tutorial zend 2 tutorial zend framework 2 view helper zend 2

Leave a Reply