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 Plain Text Field Laravel Package

digitalazgroup/nova-plain-text-field

A Laravel Nova field for displaying plain, unformatted text in your admin panel. Skip the editor and render clean, readable values in index and detail views—ideal for read-only notes, descriptions, and simple content.

View on GitHub
Deep Wiki
Context7

Getting Started

This field fills a narrow but common Nova gap: rendering read-only, non-input text inside a Resource's form and detail views (descriptions, status labels, computed values, section copy) without abusing a Text field or Heading. It is a Nova field, so the integration model is the same as any other field.

  1. Install like any Nova package (Nova is a paid package — make sure it is already present):
    composer require digitalazgroup/nova-plain-text-field
    
  2. Check the README/source for the exposed component name and constructor arguments — the package is small and low-traffic (0 dependents, no stars), so the source in src/ and resources/js/ is the authoritative docs. Look for the field class (typically Digitalazgroup\NovaPlainTextField\PlainText or similar) and its Vue component.
  3. Register it in the fields() method of the Resource you want to annotate:
    use Digitalazgroup\NovaPlainTextField\PlainText;
    
    public function fields(NovaRequest $request)
    {
        return [
            PlainText::make('Account Status')
                ->text('Active — billing current'), // or whatever the API exposes
        ];
    }
    
  4. First use case: a read-only informational row at the top of a form or detail page — e.g., "This resource syncs from the billing system; edits here will be overwritten." That is exactly the kind of copy that has nowhere good to live in a plain Nova Resource today.

If the package registers assets through Nova's service provider, no npm step is needed; if it publishes to resources/js/vendor, you must rebuild Nova (npm run dev inside your Nova installation).

Implementation Patterns

Because this is a field, you get all of Nova's field API for free — the value is in how you apply it, not in new methods.

  • Static descriptive copy: the cleanest use. Put a PlainText field above related inputs to explain what a group of fields does, what a status means, or where data comes from.
  • Computed / derived values: bind it to an attribute or resolveUsing so it reflects live model state:
    PlainText::make('Last Synced')
        ->resolveUsing(fn ($resource) => optional($resource->synced_at)->diffForHumans() ?? 'Never');
    
  • Scoping per view with Nova's built-ins rather than the package's own API: ->onlyOnDetail(), ->onlyOnForms(), ->hideFromIndex(), ->exceptOnForms(). Use ->onlyOnDetail() for debug/metadata text you don't want in edit forms, and ->onlyOnForms() for helper copy.
  • Conditional visibility via ->canSee(fn ($request) => ...) — useful for surfacing warnings ("Payment method expired") only when the state warrants it.
  • Grouping: combine multiple PlainText fields inside a Panel or alongside a Heading to build a coherent "info block" at the top of a detail view without creating a custom card.
  • Index columns: if the field renders in index tables, keep the copy very short — long strings will wrap badly and Nova index cells are narrow. Otherwise hide it with ->hideFromIndex().
  • Read-only detail views: pair with ->readonly()/no input semantics — since it is not an input, ensure you are not relying on it to submit anything. It is display-only by design.

Gotchas and Tips

  • It is not an input. Do not expect a value to persist to the database from this field. It is a presentation concern. If you need a real, editable text value, use Nova's Text.
  • Attribute binding is ambiguous. Depending on the package's API, make('Label') may or may not read the model attribute named Label. Verify the source: if it does, watch for name collisions with real columns — a PlainText::make('status') would shadow the DB column of the same name. Prefer a distinct display label and static ->text(...) if available.
  • HTML is usually not rendered. Treat copy as plain text; if the package passes strings through Vue interpolation, markup will be escaped. If you need rich content, that is a signal to build a small custom Nova card instead.
  • Nova version drift. Small packages like this (0 stars, 0 dependents, score 0) frequently target Nova 3/4 and break on Nova 4/5 because the laravel-nova JS mixin and field component contract changed. Before adopting, check composer.json for laravel/nova version constraints and confirm the Vue component still registers (Nova.booting((app) => app.component(...))).
  • Zero dependents = no external validation. Budget time to read the entire package (it is tiny) and to write one smoke test: load a Resource form and confirm the field renders. Do not assume maintenance; pin the version in composer.json.
  • Debugging rendering issues: check the browser console for missing component registrations, inspect the field's server-side payload in the JSON response (Nova serializes fields server-side), and confirm Nova::script/Nova::style includes the package's assets. If the field disappears, it is almost always canSee logic or a missing asset build.
  • Extension points: extend the field class and override the component name if you need custom styling, or fall back to a Heading for section titles and a custom card for anything richer. For most teams this package is a stopgap — a 20-line custom Nova field or Vue component often replaces it cleanly, and that is worth weighing given the maintenance risk.
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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core