Commit Graph

14 Commits

Author SHA1 Message Date
Fabian @ Blax Software d4ae9339ac feat(subscriptions): Cashier-backed subscription lifecycle with product link + events
Adds the package's missing subscription lifecycle so any host app gets
duration-aware, product-linked subscriptions without re-implementing billing:

- Models: Subscription (extends Laravel\Cashier\Subscription) + SubscriptionItem,
  in the package's UUID convention, resolved through shop.models/shop.tables.
  Subscription gains product()/resolveProduct(), callProductActions() (runs the
  product's ProductActions with the subscription + an access-expiry override),
  and recordStarted()/recordRenewed()/recordCanceled() lifecycle hooks.
- Events: SubscriptionStarted / SubscriptionRenewed / SubscriptionCanceled,
  carrying the Cashier subscription so host subclasses work too.
- Migration: UUID subscriptions / subscription_items tables (hasTable-guarded,
  config table names, nullable product_id + current_period_* columns).
- ShopServiceProvider points Cashier at these models by default; opt out via
  shop.subscriptions.register_cashier_models for apps that subclass Cashier.

Additive and backward-compatible (registration is config-gated, tables are
guarded). Adds SubscriptionLifecycleTest; full suite 1409 green. Docs + README.
2026-06-02 11:40:15 +02:00
Fabian @ Blax Software 0cfbdf221d BF edgecases, R structure, A tests 2026-05-18 13:05:38 +02:00
Fabian @ Blax Software fe41475c84 I loanable product type, tiered pricing, lifecycle events, host helpers 2026-05-15 10:27:59 +02:00
Fabian @ Blax Software 6e9c9043ae I order, A handy methods 2025-12-29 10:26:51 +01:00
Fabian @ Blax Software 9c1fcd6cfd AM orders 2025-12-29 09:59:02 +01:00
Fabian @ Blax Software c43910b927 I checkout session, pool cart price_id 2025-12-17 18:33:34 +01:00
Fabian @ Blax Software 3045f72304 BFI cart, A stripe logic, checkout & tests, A tests, RA pool product 2025-12-15 14:10:59 +01:00
Fabian @ Blax Software 4a303c0f3f I category methods, IRA product relations & tests 2025-12-05 09:21:07 +01:00
a6a2f5842 a4fedcdb58 A tests, I product action 2025-11-29 20:09:19 +01:00
a6a2f5842 929e87bc28 AI payment process & payment provider files 2025-11-26 11:09:52 +01:00
a6a2f5842 856686e292 A traits, concerns, services 2025-11-26 00:05:46 +01:00
a6a2f5842 fda536deea BFIM bugfixed failed tests 2025-11-22 18:09:45 +01:00
a6a2f5842 8fa194e7e6 BF added model table config 2025-11-21 15:22:40 +01:00
a6a2f5842 d610cc5717 init 2025-11-21 11:49:41 +01:00