Now that we have set up the Post entity and have some data in the database, let’s show this data in the index view we created earlier.
First we’re going to be setting up the model, or Entity, we’re going to be using. Earlier, when we imported the test data we got a glimps of what it will look like.. Let us start! Continue reading “4 – Create the Blog Entity”
The setup of Zend and Doctrine should now be finalized and ready to go. So let’s create our Blog module. To do this we’re going to use the MVC (Model/View/Controller) pattern. We’re also going to apply separation of concerns.
Setting up our blog application we now will be configuring both Zend and Doctrine. By default nothing is configured in the Zend Skeleton Application.
The assumption is you have some programming experience and a moderate familiarity with concepts such as MVC and seperation of concerns.
With this assumption comes the expectation you have a local development environment setup with at least PHP 5.5 on an Apache2 server and a MySQL server.
A work along tutorial on how to integrate Doctrine2 into Zend Framework 2.
A step by step work-along tutorial on how to create your first Zend Framework 2 + Doctrine 2 blog. Most of the things used are explained in depth.
If you find yourself with questions at the end of a chapter, or after finishing the tutorial, please reach out and I might be able to help you or point you in the right direction.
Table of Contents
- Setup environment
- Setup Doctrine
- Configure module
- Create Entity
- Create index
- Link module
- View single Post
- Setup add Post
- Create form
- Create input filter
- Add Post
- Edit Post
- Delete Post
Please note: this tutorial has been online a while and is no longer actively maintained/updated as it was created for Zend Framework 2. This tutorial has been online since mid 2016. The framework has since had major updates and upgrades. Even though many of the principles have stayed the same throughout the newer versions of Zend Framework, a lot of the supporting code has been upgraded. As such differences are too big to update all of the code of all tutorials.