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 relationshipsYou'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.
composer test
pnpm testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email info@javaabu.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.