Skip to content

Instantly share code, notes, and snippets.

@vineeth030
Last active October 8, 2020 16:33
Show Gist options
  • Save vineeth030/ba6c2f014af9c98f22590a763081e903 to your computer and use it in GitHub Desktop.
Save vineeth030/ba6c2f014af9c98f22590a763081e903 to your computer and use it in GitHub Desktop.
- Paying attention to consistency when naming things:
- Classes
- Methods
- Variables
- Routes
- Preventing spelling mistakes
- Preventing unsafe code
- Type hint method parameters
- Always include user input validation
- Add exception and error handling
- Use DB transactions for atomic functions
- Don’t add business logic to Controllers
- Always use doc blocks and comments
- Follow PSR4 standards
- Don’t use inline CSS
- Know the different between web response and JSON response
- Understand HTTP status codes
- Do not pass vague request payloads / parameters into repository methods
- Make sure your method returns are consistent and you have a clear return type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment