Published: Jul 25, 2020 by C.S. Rhymes When you think about defining the database for a social network you will probably think it’s going to involve hundreds of tables and complex relationships.

What type of content you want to store will affect what fields you need, but for this example we just want to store some text. The post needs to belong to a user, so we will store the user id in the post as well.

A user creates a post and you see it in your feed and you want to say you like the post to give some positive feedback to the user.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners