Final Database Design
This is a view of the tables at the end of the project:
Subweddit:
Subweddit includes an id, name, bio and logo for display and information purposes as well a mod_id, the moderator of the subweddit (the subweddit creator by default right now)
Post:
Post has a title and body, as well as an optional img field. slug is created from the title field being 'slugified' with underscores (_). As well as this, the author of the post is saved as user_id, and the subweddit the post belongs to is also present.
Follow:
The follow table is the simplest in the database. apart from the laravel created_at and updated_at fields, this table simply holds the user id and the subweddit id of the subweddit the user follows.
Comments
Post a Comment