New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

javaabu/stencil

Fluent form schemas for Laravel: define a form once in PHP and render it with Blade (javaabu/forms) or Inertia React (@javaabu/forms), with model binding, validation and closure-evaluated, conditional props.
506
Install
composer require javaabu/stencil:v1.0.0-alpha.1
Latest Version:v1.0.0-alpha.1
PHP:^8.4
Laravel:12 · 13
License:MIT
Last Updated:Nov 24, 2026
Links: GitHub  ·  Packagist
Maintainer: dash8x

Stencil

Tests codecov Latest Version on Packagist License: MIT

Fluent form schemas for Laravel. Define a form once in PHP and render it with Blade (javaabu/forms) or Inertia React (@javaabu/forms), with model binding, validation rules derived from the schema, and closure-evaluated, conditional props.

$form = Form::make()
    ->model($article)
    ->action(route('articles.update', $article))
    ->schema([
        Section::make(__('Details'))->columns(2)->schema([
            TextInput::make('title')->required()->maxLength(255)->thaana(),
            Select::make('status')->options(ArticleStatuses::class)->required(),
            Select::make('tags')->multiple()->relationship('tags', 'name'),
            TextInput::make('company_name')->visibleWhen('type', 'company'),
        ]),
    ]);
{{ $form }}
<StencilForm schema={form} />   // Inertia::render('Articles/Edit', ['form' => $form])
$article = $form->save();       // validates the request, fills the model, saves it and its relationships

Documentation

You'll find the documentation on https://docs.javaabu.com/stencil, and in the docs folder.

AI coding assistants can start from llms.txt. The package ships a Laravel Boost skill and guideline, which Boost finds by itself. See AI assistants.

Testing

composer test
pnpm test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email info@javaabu.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

javaabu/form-builder

Dynamic forms for Laravel: versioned form definitions and entries in the databas...

33 0
javaabu/widgets

WordPress classic-style widgets for Laravel: widget classes with javaabu/stencil...

55 0
javaabu/filters

Filters and sorts for Laravel index pages: define each filter once, apply it to...

181 0
javaabu/bulk-actions

Fluent bulk actions for Laravel: each authorized through the Gate with can(), op...

105 0

Version History

Pre-releases (1)
Version Released PHP Laravel License
v1.0.0-alpha.1 ^8.4 ^12.0 || ^13.0 MIT