Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Buyable Laravel Package

unisharp/buyable

UniSharp Buyable is a Laravel package for adding purchase functionality to Eloquent models. It offers a lightweight way to mark items as buyable and build simple cart, checkout, or order workflows without reinventing core ecommerce logic.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for the "purchasable" domain layer. This package answers a narrow question — "should we maintain our own Buyable contract and trait, or adopt one?" Because the surface area is a contract plus a trait (price, currency, purchasability state), the honest comparison is against roughly a day of internal engineering, not against a vendor contract. This is the clearest decision the package informs.
  • Domain modeling for catalog and monetization. If the roadmap includes products, plans, seats, add-ons, or credits, a shared buyable interface lets carts, checkouts, and order pipelines treat all of them uniformly. That directly reduces the cost of adding a new sellable type later — a roadmap-enabling decision rather than a feature decision.
  • Pricing strategy extensibility. The contract-driven design implies you can swap pricing implementations (list price, tiered, discounted, regional) behind a stable interface. Useful when deciding whether to hardcode pricing into product models or isolate it — a decision that becomes expensive to reverse after checkout code ships.
  • Integration surface with cart/order packages. If you are evaluating a cart or order library, a shared buyable abstraction reduces glue code. This informs the "which stack do we standardize on" decision, not just a single feature.
  • Deferring a pricing service. A trait-based approach keeps pricing in-process and simple. That is a legitimate short-term decision to not build a pricing microservice, and to revisit when currency, tax, or multi-region rules appear.
  • Roadmap sequencing signal. The package's scope is deliberately thin; it says nothing about taxes, discounts, subscriptions, refunds, or inventory. Its thinness is useful as a checklist of what your product still has to own.

When to Consider This Package

Consider it only under a narrow set of conditions:

  • You are on a legacy Laravel version contemporaneous with the package (roughly Laravel 5.5–5.6 era, PHP 7.x) and are not planning an upgrade. The last release was March 2018, and there is no evidence of maintenance since.
  • You want inspiration or a reference implementation for your own Buyable contract rather than a runtime dependency. Read it, copy the shape, own the code.
  • You are doing a short internal spike or prototype where dependency longevity is irrelevant.
  • You have a strict "no in-house domain utilities" policy and need something MIT-licensed and trivial to vendor.

Look elsewhere — or build it — if any of the following is true:

  • You are on a supported Laravel or PHP version. A 2018 trait package almost certainly has not been validated against PHP 8.x or modern Laravel, and Eloquent model internals have moved. Verify before assuming it installs, let alone behaves.
  • You need the things the package explicitly does not do: tax calculation, discounts and promotions, multi-currency conversion, subscription billing, inventory, refunds, or audit trails. The package covers price and currency exposure only. Adopting it will not shorten those workstreams.
  • You care about supply-chain or maintenance risk. Three GitHub stars and zero dependents means effectively no user base, no community triage, and no security response. For anything on a revenue path — checkout especially — that is a poor risk profile regardless of code quality.
  • You need SLAs, support, or a security contact. None exist here.
  • Your team can write the trait in an afternoon. Given the scope, this is likely. The package's real value is the naming and contract shape, both of which are free to imitate.

Net PM read: the idea is worth adopting; the dependency is not. Fork or reimplement, and put the saved risk budget into the parts of checkout that actually differentiate you.

How to Pitch It (Stakeholders)

To executives: This is a very small open-source utility that standardizes how our product models expose price and currency. The concept is sound and reduces duplicated pricing logic as we add new sellable types. However, the package itself was last released in 2018, has effectively no user base, and sits directly on our revenue path. Recommendation: adopt the pattern, not the package — we implement the same contract in-house in a few days, own the code, and avoid an unmaintained dependency in checkout.

To engineering: Treat this as a design reference, not a dependency. The value is the contract: a Buyable interface exposing price, currency, and purchasability, implemented via a trait on any Eloquent model, with pricing strategies swappable behind the interface. It is MIT-licensed and trivially small, so mirroring it costs little. Do not pull it in on a modern Laravel or PHP 8 stack without verifying compatibility; expect it to be unmaintained. Scope it honestly: it does not handle tax, discounts, multi-currency, subscriptions, or inventory — those remain ours to build.

Bottom line for the roadmap: low-effort, low-risk-if-vendored, near-zero value as a live dependency. Use it to settle the buyable abstraction decision now, before checkout code hardcodes pricing into product models.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels