Hi, i have an old sql file from the old corydating script that i want to port to laravel
the problem is the sql file have many tables and each table have it's columns.
E.g
table = Eye color
column = black
.............
..........
Table = Gender
clumn = male
.........
......
And many more, more than 10
so i want to create a model for every table.
But the problem is how do link all the model to the user model?
Your help will be very much appreciated.
@tykus Thanks a lot for your response.
The design is like this:
Gender table has it's columns
Hair color table with it's columns like the rest
Then the profile table gets filled with all the related/corresponding columns from the other tables .
Like this:
Table = Profile
Column
Smallint(genderid)
smallint(haircolorid)
.................
.................
The file is very old as the script only supports php 5.6
@osebo-gotokuo so you have individual tables for profile attributes? And the profile table connects particular attributes, e.g. male, black hair etc. .with the User?
Also the free laravel training might point you in the right direction.
Edit:
A while back martinbean and tray2 gave some answers concerning product variations. Like shirt color, size, etc.
If you search for those post you may be able to adapt some of the logic to your application.