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 File Size Field Laravel Package

itiden/nova-file-size-field

A simple Laravel Nova field that displays file sizes in a human-readable format. Drop it into your resource to automatically convert raw byte values into KB, MB or GB, keeping index and detail views clean and easy to scan.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit itiden/nova-file-size-field is a presentation-layer extension for Laravel Nova: a single custom field that renders a human-readable file size (bytes → KB/MB/GB) instead of a raw integer. Architecturally it is a leaf dependency — it touches no models, migrations, service providers of consequence, or request lifecycle hooks. That makes it low-risk to adopt and equally low-risk to remove. The 1.0.3 release does not change this posture; it is a compatibility fix, not new capability.

Integration feasibility High. Adoption is a composer require plus one line in a Nova resource's fields() method. No schema change, no data migration, no queue or config surface. The 1.0.3 change (PHP 8.1 compatibility, contributed via PR #5) removes what was likely the main blocker for teams on modern PHP runtimes — previously the package would have failed composer install or emitted runtime deprecations under 8.1. This release is best read as "unblocks adoption on PHP 8.1," not "adds value."

Technical risk

  • Version coupling to Nova is the dominant risk. Nova custom fields are tightly bound to the Nova major version (asset pipeline, field registration, Component contract). A 1.0.x line most plausibly targets Nova 3.x. Confirm the target Nova major explicitly before planning around it; Nova 4 projects may need a different field entirely.
  • Maintenance concentration. Small package, low commit volume, contributions arriving as one-off community PRs. Bus-factor concerns are real but bounded by the trivial blast radius.
  • PHP 8.1 support is a floor, not a ceiling. The PR title says "compatible with php 8.1"; it does not evidence testing on 8.2/8.3. Treat the upper PHP bound as unverified.
  • Display-only blast radius. Worst case is a misrendered cell, not data loss or a broken write path.

Key questions

  1. Which Nova major version does 1.0.3 support — 3.x, 4.x, or both?
  2. Does the field compute size from a filesystem path at render time, or format a pre-existing integer column? If the former, does it stat() per row on index views, and does it work against S3/remote disks?
  3. Is the PHP constraint now ^8.1 only, or does it still admit 8.0?
  4. Is there CI covering the supported PHP/Nova matrix?
  5. What is the actual maintainer commitment — is this a supported dependency or a convenience wrapper we should vendor?

Integration Approach

Stack fit Fits any Laravel + Nova application storing file sizes as integers (bytes) alongside uploads. It is a UI convenience, so it substitutes cleanly for an existing Number or Text field displaying raw bytes. If the team already formats sizes in an accessor or Vue component, this package is redundant.

Migration path

  1. Pin ^1.0.3 in composer.json; verify resolution against the project's PHP and Nova constraints in a scratch branch first.
  2. Swap the existing field declaration in each affected Nova resource for the package's field class.
  3. No data migration required — the underlying column is unchanged.
  4. Rollback is a one-line revert plus composer remove; no state to unwind.

Compatibility Gate on three axes before merging: PHP version (8.1 confirmed; 8.2/8.3 unverified), Nova major version (must match), and Laravel version (inherited from Nova's own constraints). Also confirm whether the field requires publishing compiled assets or a frontend build step — Nova 3 and Nova 4 differ here, and getting it wrong produces a silently blank cell rather than an error.

Sequencing Low urgency. Bundle it into the next routine dependency-refresh PR rather than a dedicated change. If the team is mid-upgrade to PHP 8.1, this can ride along; if the team is staying on PHP 8.0 for now, 1.0.3 buys nothing and 1.0.2 remains fine. Do not let it gate a PHP 8.1 upgrade — it is a cosmetic field and can be dropped if it obstructs the runtime upgrade.

Operational Impact

Maintenance Near-zero. No scheduled jobs, no config, no migrations, no published service provider. The only recurring cost is tracking the package against Nova upgrades — which is precisely when it is most likely to break, since Nova majors routinely restructure the custom-field contract.

Support Community-supported, single-repo, small contributor base. Do not expect SLAs or prompt responses. Mitigation: the package is small enough to fork or inline into the application as a local field if upstream stalls. Budget a half-day to vendor it if that becomes necessary.

Scaling Effectively free at the application tier — it is string formatting. The one scaling caveat is I/O: if the field resolves file size from disk per row, an index view of 50 records against S3 becomes 50 sequential network round-trips, which degrades page load linearly with page size. Confirm the data source before enabling it on high-traffic admin tables; prefer formatting a stored integer column over live filesystem lookups.

Failure modes

  • Blank or unstyled cell after a Nova upgrade (most likely; silent).
  • composer constraint conflict blocking an unrelated dependency resolution.
  • Deprecation notices on PHP versions above the tested ceiling.
  • Wrong unit or precision on very large/small values (cosmetic). None of these are data-integrity failures, which is why the risk tolerance here can be high.

Ramp-up Minutes. Any Laravel developer who has written a Nova field can read the whole package in one sitting. No specialist knowledge, no runbook, no on-call implications. Document the field declaration in the resource and move on.

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