Skip to content

Instantly share code, notes, and snippets.

View rzv-me's full-sized avatar

Razvan Aurariu rzv-me

View GitHub Profile
@rzv-me
rzv-me / laravel_naming_conventions.md
Created March 22, 2025 09:36
Laravel Naming Conventions and Best Practices

Laravel Naming Conventions and Best Practices

In Laravel, adhering to naming conventions and best practices is essential for maintaining a clean, consistent, and readable codebase. These guidelines ensure that your code is easily understandable by other developers and aligns with community standards. This document covers general naming conventions, detailed conventions for various Laravel elements, and additional best practices to optimize your Laravel application.

General Naming Conventions

Following naming conventions enhances code readability and maintainability. Below are some common naming conventions used in Laravel:

1. Class Names:

Studly Case: Class names should be in StudlyCase, also known as PascalCase, where each word in the class name starts with a capital letter and there are no separators between words. For example: UserController, PostController.