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

Text Field Type Laravel Package

anomaly/text-field_type

A lightweight text field type for the Anomaly Streams Platform, providing a standard single-line text input for forms, assignments, and addon development in Laravel-based PyroCMS projects. Simple to configure and render, it handles basic string storage without extra dependencies.

View on GitHub
Deep Wiki
Context7

Getting Started

The anomaly/text-field_type package is a single-purpose addon for the Streams Platform (the engine behind PyroCMS 3.x / Laravel-based CMSs by Anomaly Labs). It provides the standard text input field type used across streams, form builders, and CRUD admin UIs.

Install

composer require anomaly/text-field_type

The service provider is auto-discovered through Laravel and registered with the Streams addon manager. There is no publishing step for a base install — the input/output views live inside the package.

Where to look first

  • src/TextFieldType.php — the field type class; this is the source of truth for default config, the input view, and validation rules.
  • src/TextFieldTypeServiceProvider.php — addon bootstrapping (namespace, bindings).
  • resources/views/input.twig / output.twig — the actual markup, Twig-based (Streams uses Twig, not Blade).
  • resources/lang/en/addon.php / config.php — human labels and config schema.

First use case — add a text field to a stream

Via admin UI: Content → Streams → (your stream) → Fields → New Field → Text, giving it a slug, name, and optional config (max length, default value).

Via a migration (recommended for versioned code):

public function up()
{
    $stream = $this->streams->build()->make('posts', 'posts');
    $stream->addField('title', 'title', [
        'type'     => 'anomaly.field_type.text',
        'required' => true,
        'config'   => ['max_length' => 120],
    ]);
}

Once assigned, the field appears automatically in FormBuilder payloads for that stream, and its value is stored on the stream entry record — you don't wire anything else up by hand.

Implementation Patterns

Declarative config on field assignments. Each assignment to a stream carries a config array merged over the field type's defaults. Common keys: max_length, default_value, placeholder. These are read by the Twig input view and by getRules() for validation.

Form builder usage. If you build forms programmatically:

$form = $this->form->make('My\\Module\\Form\\PostForm', $entry);

Any anomaly.field_type.text assignment in the underlying stream is rendered automatically. Do not hand-write <input type="text"> for stream-managed fields — you lose validation, config, and translation rules that way.

**Validation through rules,

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
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