Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am bit confused with Laravel conventions as I am new to this framework. I am following Jeffrey Way Laracasts videos he uses Plural for Controller names.

E.g.: PagesController, Cards Controller, PostsController

But if I refer official documentations of Laravel > Controllers and Laravel > Tutorials > Quick Start > Intermediate Task List it uses Singular names.

E.g.: PhotoController, TaskController

Can anybody please list down the official coding conventions for following entities?

Tables: posts, comments, post_comments or Post, Comment, PostComment

Columns: id, post_id, comment_id or id, postId, commentId

Controllers: PagesController, Cards Controller, PostsController or PhotoController, TaskController

Models: Pages, Cards, Posts or Page, Card, Post

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
432 views
Welcome To Ask or Share your Answers For Others

1 Answer

Tables: posts, comments, comment_post

Columns: id, post_id, comment_id

Controllers: PhotoController, TaskController

Models: Page, Card, Post

For more details check out my Laravel naming conventions table.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...