Download the PHP package blemli/softrequired-for-filament without Composer
On this page you can find all versions of the php package blemli/softrequired-for-filament. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blemli/softrequired-for-filament
More information about blemli/softrequired-for-filament
Files in blemli/softrequired-for-filament
Package softrequired-for-filament
Short Description Between required and optional lies reality.
License MIT
Homepage https://github.com/blemli/softrequired-for-filament
Informations about the package softrequired-for-filament
softrequired
Between required and optional lies reality.
required() doesn't produce data — it produces asdf, [email protected], and blocked users. Some fields are required by the business but unknowable at entry time. ->softRequired() lets people save and keep working, then tracks what's missing: a warning on the field, a note on save (or a confirm modal), an incomplete() scope, an automatic table filter, and a dashboard completion widget that lists what's missing per record — and lets you complete it right there, in a modal built from your actual form fields. No migrations, no status column — completeness is derived from the data, so it can never lie. And Customer::incomplete() is a machine-readable backlog: hand it to a human — or an AI — to fill the gaps.
Installation
Register the plugin in your panel provider: ->plugin(SoftRequiredPlugin::make())
Usage
Saving always stays possible: empty soft-required fields show a warning hint, saving pops a warning notification ("Saved — still missing: Email"), the resource table grows an Incomplete filter, and a dashboard widget counts incomplete records until there are none. Prefer asking first? 'on_incomplete_save' => 'confirm' shows a "Save anyway?" modal instead. Ships in English and German.
When NOT to use this
- The whole record may be empty? That's a draft — use a status field.
- The value can be derived? Compute it, don't nag.
- You're marking most of the form? You're modelling a workflow, not completeness.
softRequired() is only for fields that are business-required, unknowable at entry, and suppliable later — by a person, or by an AI working through Model::incomplete().
License
MIT © blemli
All versions of softrequired-for-filament with dependencies
filament/filament Version ^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0