-
Book Overview & Buying
-
Table Of Contents
FuelPHP Application Development Blueprints
By :
Let's try to determine our models from the preceding specifications. Post is obviously a model, as it is the main feature of our blog (we display posts). Each post is created and updated by an authenticated user, meaning that users have to be saved into the database; therefore, we also have a User model. There can be posts without comments, and categories without any posts, meaning they belong to distinct models; therefore, there is also a Category and a Comment model.
That sums up to four models:

Entity Relationship diagram (Min-Max notation)
Post: This model has the following properties: title, small description, content, and publication date. A post is linked to a unique category and each category has many posts, so we will add an additional column here, named category_id. Similarly, each post belongs to a user (the author), so we will add the user_id column.
Category: This model only has a name property.
Comment: This model has the following properties: name, email, status and...
Change the font size
Change margin width
Change background colour