I was wondering what would be the best practice to create the following tables and relations in eloquent / laravel 4.1 models.
- table name
magazines
with fieldsid, title
- table name
magazine_issues
with fieldsid, title, magazine_id
- table name
magazine_issue_articles
with fieldsid, title, body, magazine_issue_id
I need the file/dir structure and the naming of all the Class and files, because I am really confused, for example should I make a directory named magazines
and place the Issue.php
file there and like so for the articles? And what should be the name of the class itself?
Thank you in advance.
EDIT
I need to have them in subfolders, since that would be much more portable. The question is...
will a class with the name magazineIssue
(with table name magazine_issues) will be autoloaded and registered from a file called Issue.php
in a directory named Magazine/
?
I hope you are not as confused as I am :(