Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

yachien tsai
yachien tsai
11,345 Points

How do I construct my tables for a website?

Hello everyone, first of all, I want to create a website with laravel 4 Here are my forms basicly

  1. Users register
  2. Users login
  3. A form for the users can fill up with the information of their travel, it contains
    • title,
    • continent visited,
    • country visited,
    • city visited,
    • type of information (ex. restaurant
      transport...)
    • photo,
    • content. So my question is how I construct the tables in database normally? I have now a table of user so far, but I'm wondering for the form with the information of travel, can I create table 1 with the infos of continent and countries since It's a lot of sql to build and It seems not quiet easy and suitable to build in the option of FORM, and table 2 with the rest of infos, would It be ok like that? and if it's possible, can I concat these two tables so that I can make a connection with my user ID also? Thank you yachien

1 Answer

Emmanuel Salom
PLUS
Emmanuel Salom
Courses Plus Student 8,320 Points

If you are using laravel this could be accomplished. Learn to use its eloquent ORM.