Introduction

This style guide:

  • Provides a set of styles and conventions to follow for each Laravel project you undertake.
  • Helps to maintain a level of consistency between projects and reduce cognitive overhead needed when switching between them.
  • Serves to make it simpler to onboard new developers into existing projects.
  • Is designed to change over time, as new patterns emerge and teams expand, taking into account new perspectives.
  • Aims to reflect styles and conventions that apply to current version of Laravel at all times.
  • Is and always will be a Work In Progress everything can change. Feel free to open an issue and discuss anything.

TODO

  • [ ] Create php-cs-fixer for base code formatting

PHP General Rules

Code must follow PSR-1, PSR-2 and PSR-12