Skip to content

Commit

Permalink
Convert camelCase to snake_case
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-de-wit committed Nov 27, 2020
1 parent 4966b97 commit 5a9d59f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Directives/VariantDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function manipulateArgDefinition(

/** @var AttachmentInterface $model */
$model = new $modelClass();
$attribute = $parentField->name->value;
$attribute = Str::snake($parentField->name->value);

$availableVariants = $model->{$attribute}->variants();
$allowedVariants = $this->directiveArgValue('variants');
Expand Down

0 comments on commit 5a9d59f

Please sign in to comment.