O'Reilly logo

FuelPHP Application Development Blueprints by Sébastien Drouyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Conception

We will need the following two models:

Conception

Entity Relationship diagram (Min-Max notation)

  • User: Since the model's table will be generated from the Auth package's migration, the columns will already be generated. The columns we need are username and password.
  • Post: Each post has a content and a created_at property. Since each post can only be published by a single user and each user can publish many posts, there is a belongs_to relationship between posts and users and a has_many relationship between users and posts. Thus, an additional user_id property must be added for the relationship.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required