Skip to content

Commit

Permalink
Improve the config name.
Browse files Browse the repository at this point in the history
  • Loading branch information
carvemerson committed Jan 7, 2024
1 parent f27774e commit 3102661
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/query-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@
* 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.
*/
'convert_to_snake_case_plural' => true,
'convert_relation_names_to_snake_case_plural' => true,
];
2 changes: 1 addition & 1 deletion src/Concerns/AddsFieldsToQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function addRequestedModelFieldsToQuery()

public function getRequestedFieldsForRelatedTable(string $relation): array
{
$tableOrRelation = config('query-builder.convert_to_snake_case_plural', true)
$tableOrRelation = config('query-builder.convert_relation_names_to_snake_case_plural', true)
? Str::plural(Str::snake($relation))
: $relation;

Expand Down

0 comments on commit 3102661

Please sign in to comment.