1Gegasoft uses the following name conventions for laravel
2=============================================================
3Variables => camelCase => $articlesWithAuthor
4Collection Variable => descriptive, plural => $activeUsers = User::active()->get()
5Object Variable => descriptive, singular => $activeUser = User::active()->first()
6View => snake_case => show_filtered.blade.php
7Controllers => singular, ProperCase => ArticleController
8Model Name => singular, ProperCase => User, FollowingRequest
9Model attribute/property => snake_case => $model->created_at
10Method => camelCase => getAll
11Method in resource controller => table => store
12Method in test class => camelCase => testGuestCannotSeeArticle
13hasOne/belongsTo relation => singular => articleComment
14Other relations => plural => articleComments
15Table Name => plural => article_comments
16Table column => snake_case without model name => meta_title
17Route => plural => articles/1
18Named route => snake_case with dot notation => users.show_active
19Primary key => - => id
20Foreign key => singular model name with _id suffix => article_id
21Pivot table => singular model names in alphabetical order => article_user
22Migration => - => 2017_01_01_000000_create_articles_table
23Config and language files index => snake_case => articles_enabled
24Config => snake_case => google_calendar.php
25Contract (interface) => adjective or noun => Authenticatable
26Trait => adjective => Notifiable
1$post = Post::find(1);$post->comments()->saveMany([ new Comment(['message' => 'First comment']), new Comment(['message' => 'Second comment']),]);