CasEbb's avatar

CasEbb liked a comment+100 XP

3mos ago

Similar to the previous video it seems like the form partial would have been better suited for a component. The line between partial and component is so vague at times it seems too ambiguous.

CasEbb's avatar

CasEbb liked a comment+100 XP

5mos ago

Another helpful way of mocking the environment for tests is to use the ./phpunit.xml and define the variables there. This way, everywhere in the tests the fake vendor id will be used, eg:

<env name="PADDLE_VENDOR_ID" value="vendor-id"/>

or even better call it fake-vendor-id

CasEbb's avatar

CasEbb wrote a comment+100 XP

5mos ago

You could still leave subscribe() and cancelSubscription() as public methods on your model, but have them call the service. Your models would still have a nice API, but at least the business logic would be separated.

CasEbb's avatar

CasEbb wrote a comment+100 XP

6mos ago

What about Container::scoped()?