Install & usage
Get Schemava running in your FilamentPHP panel in a few minutes — add the private repository, authenticate with your Composer auth token, register the plugin, and start building forms.
Requirements
- PHP 8.3 or newer
- Laravel 11 or 12
- FilamentPHP 5
Schemava is built specifically for FilamentPHP panels. It is not a generic Laravel admin package and is not intended for Nova, Backpack, Orchid, MoonShine, or custom panels.
1. Install
Schemava is a private, licensed package — it is not on public Packagist. Point Composer at the Schemava repository, authenticate with the Composer auth token from your purchase, then require the package:
composer config repositories.schemava composer https://repo.schemava.dev
composer config bearer.repo.schemava.dev YOUR-COMPOSER-AUTH-TOKEN
composer require asimnet/schemava
php artisan filament:assets
SCHEMAVA-XXXX-XXXX-XXXX-XXXX, for your records and support requests) and a separate
Composer auth token (a different-looking string, e.g. starting with pkdt-). Only the
Composer auth token goes in the composer config bearer.… command above — pasting the license key
there will fail with a 404. Both values are in your purchase email and on your
My License page (sign in with the email you bought with). Keep the auth token
private — it is tied to your purchase.
composer config bearer.… stores the auth token in your global Composer auth file. In CI or Docker,
provide it instead via the COMPOSER_AUTH environment variable so it never lands in your repo.
2. Register the plugin
Add the plugin to your Filament panel provider (e.g. app/Providers/Filament/AdminPanelProvider.php):
use AsimNet\Schemava\SchemavaPlugin;
use Filament\Panel;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(
SchemavaPlugin::make()
->navigationGroup('Forms') // optional
->navigationSort(100), // optional
);
}
This boots Schemava in that panel and registers the compiled visual builder with Filament's asset manager (loaded only on the designer screen, so it never bloats your other pages).
3. Run the migrations
Schemava ships the two tables it needs — schemava_schemas (your forms) and
schemava_results (responses). Run your migrations to create them:
php artisan migrate
Prefer to own the migration files, or want to publish the config in the same step? Run the installer instead:
php artisan schemava:install
4. That's it — the builder is already in your panel
Registering the plugin added a Forms section to your panel and wired the designer routes for you. Create a form, then click Design to open the visual builder — nothing else to set up.
Want to use your own resource, change the navigation, or control who can see Forms? A few plugin options:
SchemavaPlugin::make()
->surveyResource(false) // register your own resource instead of the bundled one
->navigationGroup('Content') // group / label it in the panel nav
->navigationSort(20)
->authorize(fn () => auth()->user()->can('manage-forms')); // gate who sees/opens the builder
If your app registers its own designer routes (multi-tenant apps often do), set
schemava.routes.enabled to false in the published config so the package doesn't
register them too.
5. Render forms & collect responses
Each saved form is stored as SurveyJS-compatible JSON on the SurveySchema record.
Render it to your end users with the open-source, MIT-licensed
survey-core engine — the
same engine the builder previews with. Pass $schema->survey_json to a survey-core
model on the client and handle its onComplete to submit answers back to your app.
Submissions are persisted as SurveyResult records through the
submission handler contract, so you can store responses however your domain needs.
Quiz-style scoring is available via the bundled score calculator.
renderer_version in the config to the exact
survey-core version every client renders with (web, mobile, etc.), so the builder always validates
against the same engine that ultimately renders the form.
6. Public form & JSON API
Prefer not to build the renderer yourself? Schemava ships two turnkey ways to collect responses. Both reuse the same access rules and submission handling — and you decide who may submit.
Public form
A standalone fill-and-submit page is served at /surveys/{hash}. Each form's exact
Public form URL is shown (copyable) on its View page in the panel — share the link and people fill
it in the browser, no code on your side.
JSON API — for mobile & external clients
A small read/submit API lets native apps and other services consume your forms. The base URL is also shown on each form's View page as the API endpoint.
| Method & path | Purpose |
|---|---|
GET /api/surveys | List active forms (id, hash, title, description). |
GET /api/surveys/{hash} | Fetch one form: survey_json, renderer_version, can_submit. |
POST /api/surveys/{hash}/responses | Submit { "data": { … } }; returns the created response. |
Who may submit is your call
Nothing is exposed by accident — control both surfaces in config/schemava.php:
'routes' => [
'public' => [
'enabled' => true, // false: expose no public form
'middleware' => ['web'], // add 'auth' to require a logged-in user
],
'api' => [
'enabled' => true, // false: expose no API
'middleware' => ['api'], // add 'auth:sanctum' / 'auth:api' to require a token
],
],
The defaults allow guests so a public form works out of the box; add auth middleware to require a login or token. For per-form, role, age, or open/close-window rules, bind your own access resolver — it gates the public form and the API identically.
Configuration
Publish the config file to tune behavior:
php artisan vendor:publish --tag=schemava-config
Key options in config/schemava.php:
| Option | What it does |
|---|---|
models.schemamodels.result | Swap in your own Eloquent subclasses to add domain behavior (relations, scopes, targeting). |
tables.* | Override the table names if they clash with your schema. |
storage.disk | Filesystem disk for builder images and respondent uploads (default public; set a private/S3 disk in production). |
renderer_version | The survey-core version the builder validates and previews against. |
contracts.* | Host-overridable implementations — see below. |
routes.* | Prefix, middleware, and naming for the designer and public form routes. |
policy | An optional policy class for the schema model; leave null to use your own gates. |
Advanced: integration contracts
Schemava resolves five contracts that you can replace to integrate it with your domain. Each ships a sensible
default, so you only override what you need (set the class in config('schemava.contracts.*')):
| Contract | Override to… |
|---|---|
RuntimeContextProvider | feed dynamic values (the signed-in user, locale, custom variables) into form piping. |
SurveyAccessResolver | decide who may view or submit a form (roles, age, gender, targeting). |
SurveySubmissionHandler | change how a submission is stored or routed (the default creates a SurveyResult). |
SurveyUrlResolver | build the public URL for a form. |
AiAssistant | answer builder AI queries (default is a no-op — see below). |
AI-assisted building (optional)
Schemava can let editors describe a form in plain language and have it drafted for them. This is off by default.
To enable it, install the AI SDK and bind an assistant in the config's contracts.ai_assistant:
composer require laravel/ai
You are responsible for reviewing AI-generated content before use and for ensuring it is lawful, accurate, and appropriate for your use case.
Updates & your license
Your purchase includes one year of updates. Update any time within that window with:
composer update asimnet/schemava
php artisan filament:assets
Because you require "asimnet/schemava": "^1.0", Composer keeps you on stable 1.x releases
— pre-releases never reach your servers unless you explicitly opt in. After your update window ends the plugin
keeps working; renewing only unlocks newer releases. Your auth token stays valid for installs tied to your purchase.
Troubleshooting
Composer says 403 / 404 / could not authenticate
Your Composer auth token is missing, wrong, or you pasted the license key by mistake — the license key and the
Composer auth token are different strings. Re-copy the auth token from
My License and re-run the composer config bearer.repo.schemava.dev …
command. A refunded purchase revokes the token.
The visual builder doesn't load / assets are missing
Run php artisan filament:assets after installing or updating, then hard-refresh. In production,
make sure that command runs as part of your deploy.
Image or file uploads fail
Check storage.disk in the config and that the disk is writable and (if needed) publicly served
via php artisan storage:link.
The package won't resolve in CI
Provide the repository + token through the COMPOSER_AUTH environment variable rather than committing
your auth.json.
Support
Stuck or found a bug? Reply to your purchase email, or write to support@schemava.dev. Support is included for one year from purchase.
See also: My License · Terms · Refund policy