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

Laravel Nova Time Field Laravel Package

michielfb/laravel-nova-time-field

A Laravel Nova field that adds a time picker input for selecting times in Nova resources, with simple formatting and seamless integration into Nova forms and indexes.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a presentation-layer Nova field: one Field subclass, one Vue component, a service provider. It touches nothing in the domain model — no migrations, no publish step, no repository or service bindings. That means it can be dropped into an existing Nova resource and removed again without touching business logic, which is the property you want from a component this small. Its only meaningful architectural claim is semantic: it asserts that an attribute is a wall-clock time-of-day, not an instant. That assertion is the actual decision being made; the widget is downstream of it.

Integration feasibility. Low. composer require after Nova credentials are configured, auto-discovered provider, drop the field into a resource. The one non-obvious piece is the wrapper subclass in app/Nova/Fields, which costs ~30 lines and buys a single seam for conventions, validation rules, and any future fork. Realistic envelope: one engineer-day including round-trip verification against the database, more if the target column is currently DATETIME.

Technical risk. Concentrated in stewardship, not runtime:

  • Single maintainer, 20 stars, zero dependents, last release Dec 2024. No downstream population means breakage is discovered by you first.
  • Nova major compatibility is unverified. Nova's field API has moved across 3 → 4 → 5; release recency does not imply your major is declared in the package's laravel/nova constraint.
  • Compiled asset state is unknown. If dist/js is not committed you inherit an npm build step for a twenty-star dependency — a worse trade than writing the component. If it is committed, a Nova upgrade can silently invalidate it and the field renders blank with no PHP error.
  • Silent data loss on seconds. HTML5 time inputs default to a 60-second step; a legacy TIME column holding 09:30:15 returns 09:30:00 after one edit-and-save, with no error and no log line.
  • Empty-string vs NULL. Browsers submit "" for a cleared input; strict MySQL rejects that on a time column rather than storing NULL.
  • Locale-driven rendering. 12h/24h display is browser-locale, not application-controlled. Wrong-slot bookings surface in business data, never in logs.
  • Not timezone-aware by design. Correct for shifts and opening hours; wrong for anything needing conversion, DST handling, or cross-region comparison.

Key questions to answer before committing:

  1. Which Nova major are we on, and does the package's composer.json name it explicitly?
  2. Is dist/js/field.js committed, and does it load cleanly in our Nova version?
  3. What exactly does the field write for 00:00, 23:59, and a cleared value — verified via DB::table(), not the browser?
  4. Is the target column already TIME, or is it DATETIME with a throwaway date?
  5. Are we standardizing on 24-hour input, and have we smoke-tested the browser matrix our operators actually use?
  6. Do multiple resources need this, or is this a single-field need better served by a Text field with a regex?
  7. Who owns this dependency, and what is the exit plan if upstream goes quiet or breaks on the next Nova major?

Integration Approach

Stack fit. Addressable only if Laravel Nova is already in the estate — that is the first filter, not the last. Within Nova, the fit is clean: no competing field conventions to reconcile, no service container involvement, no config surface. If an internal field kit already exists, adopting a second convention costs more in coordination than writing a local field costs in effort, and the recommendation flips to build.

Migration path. The package changes the input widget; it does not change storage. Keep those separate:

  1. Deploy one: swap the field in, write HH:MM into the existing column, read it back through a format accessor, verify round-trip on real rows including a legacy row with non-zero seconds.
  2. Deploy two: alter the column to native TIME once the write shape is proven.

Never combine "change the widget" and "change the storage type" in one release — if the round-trip is wrong you will not know which half broke it. Add a model mutator or saving hook to converge on a single storage shape (null normalization, seconds policy) so the rest of the app stays honest regardless of what the browser sent.

Range validation is yours, not the field's. Note that Laravel's after: rule on bare times rejects legitimate cross-midnight windows (22:00–02:00); compare minutes-since-midnight explicitly for overnight ranges.

Compatibility. Pin the version explicitly — do not float on ^1.0. Read the declared laravel/nova constraint against the major we run, confirm dist/js is present, and check resolve/fill behavior on empty input — all readable in one sitting before shipping. Resolve Nova credentials in CI on their own merits; that is an onboarding blocker that will masquerade as a package problem.

Sequencing. This is a cheap probe, and it should be sequenced as one:

  1. Confirm Nova creds in CI and local.
  2. Read the vendor source (an hour, not a project).
  3. Wrap it in App\Nova\Fields\TimeOfDay with house rules and a format hint.
  4. Ship to a single low-risk resource with a genuine time-of-day attribute (opens_at, shifts.starts_at).
  5. Verify against the database, then standardize across the other resources.

Do not run this concurrently with, or immediately before, a Nova major upgrade. Adopting compatibility risk at the moment it is most likely to bite is a sequencing error.

Operational Impact

Maintenance. Runtime cost is nil; stewardship cost is real. Add the dependency to the inventory with a named maintainer and a written exit plan. The fork is hours, not weeks — roughly a hundred lines — and the wrapper class makes the swap a one-line namespace edit. Treat "we will fork if needed" as a plan, not a hope, and name the trigger (upstream quiet through the next Nova major, or a needed feature like seconds/step support).

Support. There is no vendor, no SLA, and no release cadence commitment. You are adopting code, not buying support. Internal support burden is low but non-zero: the failure modes below will be diagnosed by whoever owns the admin surface, and the debugging sequence should be documented rather than rediscovered — (1) does the label render, (2) are assets 404ing, (3) what is the actual form payload, (4) what is in the column. Each step isolates a different layer; guessing at the Vue side first wastes the afternoon.

Scaling. Runtime scales with Nova itself; the field adds nothing measurable. The scaling risk is organizational: once two or three resources need time entry, divergent implementations become a data-quality and support problem. Standardize on the wrapper class early and refuse the "text field with a regex, just this once" drift — that drift is precisely what this component exists to prevent.

Failure modes to watch:

Failure Symptom Detection
Stale/missing compiled assets Form renders, input missing or unstyled Browser console 404; mix-manifest.json mismatch
Nova major incompatibility Field blank in production, no PHP error Pre-upgrade staging pass
Seconds truncation Legacy 09:30:15 becomes 09:30:00 Compare raw column before/after edit
Empty vs null MySQL incorrect-value error on clear Explicit cleared-field test
Locale rendering 12h control writing into a 24h column Operator browser matrix smoke test
Cross-midnight range rejected Valid overnight window fails validation Minutes-since-midnight rule + test

Ramp-up. A Nova-fluent engineer is productive in under a day; the source is small enough to read fully and the wrapper pattern is self-documenting. The larger ramp-up is operator-facing, not developer-facing: put the expected format in ->help() ("24-hour, e.g. 09:30"), treat server-side date_format:H:i as non-negotiable rather than belt-and-braces, and smoke-test on the actual browsers operations uses. Budget the time saved on integration into the things the field does not do — server-side validation, round-trip testing against existing rows, and a decision on the browser matrix. That is where the residual risk actually lives.

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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib