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
Model Fields

Model Fields Laravel Package

watheqalshowaiter/model-fields

Easily add custom fields to Laravel Eloquent models with watheqalshowaiter/model-fields. A simple trait stores dynamic, validated attributes as JSON, letting you extend models without extra migrations or schema changes.

View on GitHub
Deep Wiki
Context7

Quickly retrieve required, nullable, and default fields for any Laravel model.

Frequently asked questions about Model Fields
What is watheqalshowaiter/model-fields used for?
It is a dev-only Laravel tool that quickly retrieves required, nullable, and default fields for any Eloquent model. It exposes Artisan commands that derive model field definitions such as fillable arrays from your application's schema or migrations. It is not a runtime dependency and adds no request-path footprint.
How do I install watheqalshowaiter/model-fields?
Install it as a dev dependency with composer require --dev watheqalshowaiter/model-fields. The service provider is auto-discovered, and configuration can optionally be published. Run the generator on a scratch branch and review the diff before committing.
Does model-fields support Laravel 13?
The 3.2.2 release adds a Laravel 13 constraint, and the package is described as fitting Laravel 10.x through 13.x. The assessment cautions that the release note does not confirm Laravel 13 is in the CI matrix, so verify the resolved Illuminate version and PHP floor. Upgrading from 3.2.1 to 3.2.2 is a patch bump and should be safe on existing Laravel versions.
Does model-fields read migrations or the live database schema?
The package derives model field definitions from the application's schema or migrations, but the evaluation flags the exact source as an open question. It is not established whether it reads migrations, the live schema, or a connection-less schema dump. Confirm that behavior before relying on it in automated workflows.
Can I run model-fields in CI without a database?
Running the generator in CI without a database depends on whether it needs a live connection, which the assessment lists as a question for the maintainer. If it can run offline, regenerate into a temporary path and fail on drift so the tool acts as a guardrail. If it requires a database, provide a disposable schema in the CI job.
What does model-fields generate for a model?
The tool retrieves required, nullable, and default fields and derives model field definitions such as fillable arrays. The assessment flags the exact generation policy, including fillable from nullable or non-nullable columns, guarded, casts, and relationship methods, as something to confirm and configure. Treat generated output as reviewable code rather than blindly committing it.
How does model-fields handle enums, JSON columns, and generated columns?
Enums, JSON or JSONB columns, generated columns, spatial types, and composite keys are the historical failure surface for schema introspection tools. The evaluation explicitly asks how model-fields handles these cases. Test them on a representative branch and review any generated diff manually before trusting the output.
Is model-fields safe to use in production?
It is a developer-tooling package with no middleware or request-path footprint, so production runtime risk is low. Keep it as a dev dependency and never wire the command into deploy or boot. Run it in a developer working tree, review the diff, and commit only accepted output.
What are alternatives to model-fields?
The package sits alongside ide-helper and similar generators that derive model metadata from the application. Hand-maintaining fillable arrays is a deliberate alternative and acts as a review gate. Choose based on whether you need CI drift detection and how well the tool handles your column types.
Who maintains model-fields and what happens if it is abandoned?
The package is a single-maintainer project with a narrow user base, so bus factor is the main risk. The blast radius is limited because it is dev-time code generation and the committed fillable arrays survive abandonment. Pin the version, review generated diffs, and be prepared to drop the package while keeping its output.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager