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

Nova Currency Vat Field Laravel Package

optimistdigital/nova-currency-vat-field

Laravel Nova field for currency amounts with VAT support. Enter and display prices as net or gross, configure VAT rates, and keep formatted monetary values consistent across Nova forms and detail views. Simplifies price input and VAT-aware display in Nova admin panels.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install and register. Add the package via Composer, then check whether it ships a service provider with auto-discovery. If it publishes config or views, run the publish command once and commit the published files so environment drift is visible in code review.
  • Confirm your version. This assessment targets 3.1.1. Because 3.1.1 is a patch release, existing 3.1.x code should run unchanged — but pin the constraint (^3.1) and run your form/UI test suite after bumping, since input-behaviour changes are easy to miss in assertions.
  • Look here first: the package's README usage block, then its CHANGELOG/UPGRADING files, then the source of the input component itself (usually one Blade view plus a small JS/Alpine or vanilla script). The component is the contract; the docs lag behind patches.
  • First use case: drop a single numeric field into an existing form (Blade or Livewire), bind it to a model attribute or a public property, add server-side validation rules (numeric, min, max), and submit. Confirm the round-trip renders and persists correctly before rolling it into multi-field forms — that validates wiring, asset loading, and validation integration in one pass.

Implementation Patterns

  • Treat it as a presentation layer. The component renders and constrains input in the browser; your Form Request, $this->validate(), or Validator::make() remains the source of truth. Never rely on min/max/step attributes alone for correctness — mirror them in rules.
  • Bind once, cast on the boundary. For Livewire, bind with wire:model (or the package's documented directive) and cast in rules()/casts rather than in the view. For plain Blade, hydrate the value with old('field', $model->field) so validation failures preserve user input.
  • Keep step/min/max in one place. Define numeric constraints in a config array or a form-object/DTO and pass them to the component, rather than hardcoding attributes in markup. Server rules and client attributes then stay in sync when limits change.
  • Wrap it in your own Blade component if you use it in more than a handful of places. That gives you a single seam for styling, error display, and future behaviour changes like the 3.1.1 scroll fix, without touching every form.
  • Pair with your existing form scaffolding. It slots naturally into Breeze/Jetstream/Filament-style forms: keep labels, @error blocks, and helper text in your wrapper, and let the package own the input itself.
  • Test at the browser boundary sparingly. Unit-test validation and model persistence; reserve Dusk/Pest browser tests for the interactive behaviours (keyboard stepping, focus, and now scroll) that only exist client-side.

Gotchas and Tips

  • Scroll-wheel behaviour changed in 3.1.1. Scrolling over a focused input no longer increments or decrements its value. This is the correct fix — accidental scroll during page navigation silently corrupting numeric fields is a real data-integrity bug — but it is a visible UX change. If any documentation, onboarding notes, or support macros mention "scroll to adjust," update them.
  • Audit browser tests for wheel events. Any Dusk/Pest browser or Cypress/Playwright test that simulated a wheel/scroll over the input to change its value will now fail. Replace with explicit type(), arrow-key presses, or direct value assignment.
  • Keyboard and stepper controls still matter. With scroll disabled, arrow keys and any spinner buttons become the primary interaction. Verify they respect step, min, and max, and confirm focus is visible for keyboard users — this is an accessibility improvement, not just a behaviour tweak.
  • Don't re-enable scroll casually. If a stakeholder asks for the old behaviour back, do it in your wrapper via an explicit opt-in, not by pinning to 3.1.0. Pinning silently ships the data-corruption bug forward.
  • Debugging checklist for "my value won't change": confirm focus is actually on the input, check whether a JS error halted the component's initialisation, verify the script is loaded once (duplicate includes cause double-binding), and check wire:ignore/wire:key placement if the field is inside a Livewire loop.
  • Extension points to prefer: published views/config, the package's documented events or callbacks, and your own wrapper component. Avoid patching files in vendor/ — the next patch release will overwrite them and hide the fix from review.
  • Upgrade hygiene: 3.1.1 needs no migration or config change. Bump, click through one form, run the suite, and note the scroll change in your release notes for QA so it isn't filed as a regression.
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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin