Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rafetirmak's avatar

Suggested Name Conventions of Laravel

I could not succed to find a summary / comparation table of suggested name convention of Laravel and I wrote my own. I just want to share with forum members.

Database Table Names

  • Format: snake_case
  • Example:
    • $user_name
    • $user_surname

Route and URL Names, View File Names

  • Format: kebab-case
  • Example:
    • $user-name
    • $user-surname

Model Name, Controller Name, Middleware Name

  • Format: Pascal Case or Studly Case
  • Example:
    • $UserName
    • $UserSurname
0 likes
2 replies
jlrdw's avatar

Also all through the documentation are examples.

2 likes

Please or to participate in this conversation.