Skip to content

Commit

Permalink
Update config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVanderbist committed Jan 8, 2024
1 parent 002f394 commit c85289f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions config/query-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,13 @@
'disable_invalid_sort_query_exception' => false,

/*
* By default, the package convert the relationship names to snake case plural when using fields[relationship].
* Set this to false if you don't want that and keep the relationship names.
* By default, the package expects relationship names to be snake case plural when using fields[relationship].

This comment has been minimized.

Copy link
@siarheipashkevich

siarheipashkevich Jan 8, 2024

@AlexVanderbist why do you use "plural" word here and in the name of constant?

* For example, fetching the id and name for a userOwner relation would look like this:
* GET /users?fields[user_owner]=id,name
*
* Set this to `false` if you don't want that and keep the requested relationship names as-is and allows you to
* request the fields using a camelCase relationship name:
* GET /users?fields[userOwner]=id,name
*/
'convert_relation_names_to_snake_case_plural' => true,
];

0 comments on commit c85289f

Please sign in to comment.