https://github.com/thecodeholic/yii2-best-practices
This repository contains best practices and recommendations about Yii2 framework
https://github.com/thecodeholic/yii2-best-practices
Last synced: 7 months ago
JSON representation
This repository contains best practices and recommendations about Yii2 framework
- Host: GitHub
- URL: https://github.com/thecodeholic/yii2-best-practices
- Owner: thecodeholic
- Created: 2021-01-11T08:55:15.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-11T09:07:32.000Z (almost 5 years ago)
- Last Synced: 2025-04-10T00:53:40.063Z (7 months ago)
- Size: 1000 Bytes
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yii2 Best Practices
This repository contains best practices and recommendations about Yii2 framework
## Database
#### Naming database tables
Name your tables always in singular form (Ex: `user`, `article`, `country`).
Naming your tables in plural form (Ex: `users`, `articles`, `countries`) will cause by default models to have name in plural as well (Ex: `Users`, `Articles`, `Countries`) and you will have to manually change the generated model names in relations.