Skip to content

Instantly share code, notes, and snippets.

@agamm
Created April 30, 2013 09:36
Show Gist options
  • Save agamm/5487668 to your computer and use it in GitHub Desktop.
Save agamm/5487668 to your computer and use it in GitHub Desktop.
Laravel 3 Naming Convenstions
1) Database:
table name (Eg. users)
field name (Eg. department_id)
2)Controllers:
Name_of_the_controller + _Controller. (Where the name of the controller normally starts with a capital letter. The filename should be the same with name of the controller.)
3) Models:
Name_Model (try to spesify in a single word (eg. no underscores).
Resources:
http://stackoverflow.com/questions/14449912/convention-table-names-with-underscore
(Thanks: https://gist.github.com/anchetaWern/4223764)
By the way:
This is only what I try to follow, take into consideration (this isn't official).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment