()
| 3134 | class MixinGenericDemo |
| 3135 | { |
| 3136 | public function demo(): void |
| 3137 | { |
| 3138 | $line = new ScaffoldingOrderLine(); |
| 3139 | |
| 3140 | // @mixin Builder<TRelatedModel> on Relation resolves TModel → Product |
| 3141 | // through: BelongsTo @extends Relation<Product> → @mixin Builder<TRelatedModel> |
| 3142 | // → TRelatedModel=Product → Builder<Product> → firstOrFail(): TModel=Product |
| 3143 | $line->product()->firstOrFail()->getPrice(); |
| 3144 | |
| 3145 | // Same resolution through find() |
| 3146 | $line->product()->find()->getSku(); |
| 3147 | } |
| 3148 | } |
| 3149 | |
| 3150 |
nothing calls this directly
no test coverage detected