{"repo":"alexeymezenin/laravel-best-practices","free":true,"listed":false,"github":"https://github.com/alexeymezenin/laravel-best-practices","clone":"git clone https://github.com/alexeymezenin/laravel-best-practices.git","description":"Laravel best practices","language":null,"stars":12321,"topics":["laravel","best-practices"],"license":null,"category":"databases-storage","readme_excerpt":"You might also want to check out the real-world Laravel example application and Eloquent SQL reference Translations: Nederlands (by Protoqol) Indonesia (by P0rguy, Doni Ahmad) 한국어 (by cherrypick) 日本語 (by 2bo) 简体中文 (by xiaoyi) 繁體中文 (by woeichern) ภาษาไทย (by kongvut sangkla) বাংলা (by Anowar Hossain) فارسی (by amirhossein baghaie) Português (by jonaselan) Українська (by Tenevyk) Русский Tiếng Việt (by Chung Nguyễn) Español (by César Escudero) Français (by Mikayil S.) Polski (by Karol Pietruszka) Română (by als698) Türkçe (by Burak) Turkmen (by Artyom Osepyan) Deutsch (by Sujal Patel) Italiana (by Sujal Patel) Azərbaycanca (by Maharramoff) العربية (by ahmedsaoud31) اردو (by RizwanAshraf1) မြန်မာဘာသာ (by Kaung Zay Yan) Contents Single responsibility principle Methods should do just one thing Fat models, skinny controllers Validation Business logic should be in service class Don't repeat yourself (DRY) Prefer to use Eloquent over using Query Builder and raw SQL queries. Prefer collections over arrays Mass assignment Do not execute queries in Blade templates and use eager loading (N + 1 problem) Chunk data for data-heavy tasks Comment your code, but prefer descriptive method and variable names over comments Do not put JS and CSS in Blade templates and do not put any HTML in PHP classes Use config and language files, constants instead of text in the code Use standard Laravel tools accepted by community Follow Laravel naming conventions Convention over configuration Use shorter and ","default_branch":null,"files":null,"tree":[],"storefront":"/r/alexeymezenin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alexeymezenin/laravel-best-practices/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}