title: Laravel - Database, Table and Column Naming Conventions?
body: <p>I'm using laravel eloquent data objects to access my data, what is the best way to name my tables, columns, foreign/primary keys etc?</p>
  
  <p>I found, there are lots of naming conventions out there. I'm just wondering which one best suits for laravel eloquent models.</p>
  
  <p>I'm thinking of following naming convention:</p>
  
  <ol>
  <li>Singular table names (ex: Post)</li>
  <li>Singular column names (ex: userId - user id in the post table)</li>
  <li>Camel casing for multiple words in table names (ex: PostComment, PostReview, PostPhoto)</li>
  <li>Camel casing for multiple words in column names (ex: firstName, postCategoryId, postPhotoId)</li>
  </ol>
  
  <p>So with this, I could use similar syntax in the controller.</p>
  
  <pre><code>$result = Post::where('postCategoryId', '4')-&gt;get();
  </code></pre>
  
  <p>Are there any recommended Laravel guidelines for this? Can I proceed with these naming conventions?</p>
  
  <p>If someone has better suggestions, I will be very happy to hear them.Thanks a lot!</p>