Skip to content

Commit ec7f2d1

Browse files
committed
2 parents 11905f3 + b9e6b16 commit ec7f2d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ The quickest and easiest way, getting a `Whitecube\Price\Price` instance so you'
8181
$price = $product->price;
8282
```
8383

84+
By default, this will return the latest price that has the `selling` type, but you can change that by overriding the `getDefaultPriceType` method on your class. It must return a string that corresponds to the price type you want to use by default for that priceable item class.
85+
8486
### Accessing the relationship manually
8587

8688
The above example does a little magic via an accessor method on the trait to make the most common use case easier, but behind the scenes it's a simple query on a relation. You can query this relation yourself when necessary (and with the help of the `current()` scope, it will only return the currently active price).

0 commit comments

Comments
 (0)