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

Quantity Laravel Package

lara-zeus/quantity

Lara Zeus Quantity is a Laravel package for working with quantities and units of measure. Define units, convert values between them, and format quantities cleanly, making it easy to handle product weights, lengths, and other measurements in your applications.

View on GitHub
Deep Wiki
Context7

Lara Zeus Quantity is a Filament form field that adds a compact quantity input with built-in increment and decrement buttons. Drop it into any resource or form to let users adjust numeric values quickly, with sensible defaults and full control over limits and appearance.

  • Stepper buttons for quick increment/decrement
  • Configurable min, max, and step values
  • Optional prefix and suffix labels
  • Supports reactive and live updates
  • Seamless integration with Filament forms
Frequently asked questions about Quantity
What is lara-zeus/quantity and what can I use it for?
It is a single-purpose Filament form field that renders a number input with user-friendly increment and decrement buttons, min/max bounds, and step and precision handling. Typical uses are order quantities, stock adjustments, seat or provisioning counts, measurements, and recipe quantities. It only controls how a quantity is entered, so reservations, availability, tiered pricing, and unit conversion still belong in your domain layer.
How do I install lara-zeus/quantity in a Laravel Filament app?
Run composer require lara-zeus/quantity and then use Quantity::make('quantity') inside your form schema. There is no migration, no service provider registration in the common case, and no config publish required. A fluent definition with label, minValue, maxValue, default, and required gets you a working field, so ramp-up is typically under an hour if the version constraints resolve.
Does lara-zeus/quantity support Filament 4?
No, the 3.x line is built for Filament 3 and Livewire 3, so on a Filament 4 panel this is a hard stop. Before committing, diff the package composer.json constraints against filament/filament, livewire/livewire, laravel/framework, and php for your target panel. Discovering the mismatch mid-sprint is the expensive version of this mistake.
How do I set minimum and maximum values on a Quantity field?
Chain minValue() and maxValue() on the field, for example Quantity::make('quantity')->minValue(1)->maxValue(500)->default(1)->required(). These control the field affordances and the usable range of the stepper in the browser. They are a UX convenience, not a guarantee about what your application accepts.
Are minValue and maxValue enforced on the server?
Treat them as client-side affordances plus Filament validation at best, and back them with your own validation rules and domain checks. A screen that accepts a quantity the warehouse cannot fulfil because the field had a max is a real failure mode. Bounds in the input never replace availability, reservation, or business-rule enforcement on the server.
How do step and precision affect the stored quantity value?
The field exposes step and precision settings, so confirm the defaults for getStep() and getPrecision() against your column types and Eloquent casts. A decimal(10,3) column paired with a field emitting two decimals will silently truncate measurements until a report looks wrong. Decide deliberately whether quantities are integers or scaled decimals before you ship the form.
Why is my quantity input rendering unstyled after an upgrade?
This is usually stale published CSS or Tailwind content paths that do not include the vendor directory, which produces a field that works but looks broken. Re-publish or rebuild assets after upgrading the package and check that your tailwind.config content globs cover vendor paths. The symptom is silent, so add a quick visual check to your upgrade checklist.
Does the increment/decrement delay break live totals in my form?
Version 3.0.2 changed increment and decrement to delay live updates so rapid clicking does not fire a request per tap. Any dependent UI such as a line subtotal, cart badge, or running total may now observe batched rather than per-click updates. Check whether the delay interval is configurable in the field or Blade view and tune it to how responsive your totals need to feel.
Does lara-zeus/quantity support units of measure along with the number?
The package documentation shows an extension toward a combined value plus unit field, which is a schema decision rather than a UI one. Decide early how the value serializes: a single scalar quantity, or number plus unit as an array or string. That single answer determines your migration shape, casts, and everything downstream, and it is materially costlier to reverse than the dependency itself.
Is lara-zeus/quantity maintained, and what is the fallback if it stalls?
It is a single-maintainer package with a small star count and no dependents, and release 3.0.2 was mostly docs and CI housekeeping plus one behavioural fix, so read it as stable and cared for rather than actively expanding. No SLA exists and none should be assumed, so pin the version and plan an exit. A documented fallback is a thin Alpine stepper wired to wire:model.live.debounce, which is roughly one to two days of work and sets the ceiling on this dependency's downside.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource