Join Jon Peck for an in-depth discussion in this video Modeling a magazine, part of Learning Symfony2 for PHP.
- [Voiceover] Before we add anything else…to our application,…let's define exactly what we're going to be building.…Within the context of our magazine cataloging application…we're going to focus on two models.…The first is for the publication as a unifying record.…A publication can have many individual issues.…Any particular issue can belong to single publication.…Each publication entity has a unique identifier, id…which we'll store as an integer…and treat as the primary key.…Each publication has a name…and varchar will store that cleanly.…
A magazine back issue entity is a bit more complex.…It starts with an id, which is an integer and primary key.…We're going to be wanting to relate issues…to publications using a foreign key…so publication_id which was an integer as well.…Each issue has a distinct number as assigned by the publisher…which we'll store as an integer…and issues come out on a particular date of publication…and the date format works just fine for that.…Hours and minutes really don't apply.…Finally, we're store the path of the file…
- Installing Symfony
- Creating a bundle from the console
- Customizing and generating database tables
- Generating controllers
- Creating, editing, and debugging entities
- Displaying and debugging a form
- Rendering content with templates
Skill Level Intermediate
Q: When trying to access the application, I receive an error stating "This script is only accessible from localhost." How can I get around this restriction?
A: The development front controller and configuration scripts are protected by default to only allow access from the localhost. Refer to the video titled “Exploring the Symfony layout” to see how to disable this security.