Closed guiwoda closed 9 years ago
hi @guiwoda
This is a great feature and I think is a necessary requirement to ensure the package fits well with Laravel conventions. However, there are no tests surrounding this PR. If you could, please update from master, and the required tests for this feature.
Thanks.
@kirkbushell there! rebased master and done some tests. Let me know if you need something else! :smile:
Excellent, thanks for that. Will check shortly then mege in :)
The laravel convention goes something like this:
Given a
User
,Group
andRealBusiness
schema:users
,groups
andreal_businesses
for table names (pluralized snaked form.)users.id
,groups.id
for ids (id
as identifier convention.)user_group
for belongsToMany association tables (singular snaked concat of table names.)$realBusiness->user
for belongsTo associations (singular camel case of entity name.)$user->realBusinesses
for hasMany and belongsToMany associations (plural camel case of entity name.)Using
Illuminate\Support\Str
To convert between singular / plural / camel / snake forms, so it should behave exactly as Laravel.