Skip to content

Commit

Permalink
Merge pull request #196 from dystcz/feature/update-product-option-values
Browse files Browse the repository at this point in the history
Add product option handle on option relation
  • Loading branch information
repl6669 authored Nov 5, 2024
2 parents 23d1a3b + df150e7 commit d125640
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public function fields(): iterable
fn (ProductOptionValue $model, string $attribute) => $model->translate($attribute),
),

Str::make('product_option_handle', 'handle')
->readOnly()
->on('option'),

BelongsTo::make('product_option', 'option')
->readOnly()
->type(SchemaType::get(ProductOption::class))
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Urls/JsonApi/V1/UrlSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function filters(): array

Where::make('slug'),

...parent::fields(),
...parent::filters(),
];
}
}

0 comments on commit d125640

Please sign in to comment.