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

Eloquent Default Laravel Package

tusimo/eloquent-default

A Laravel package that lets Eloquent models declare default attribute values, reducing boilerplate and keeping newly created records consistent without repeating assignments across controllers and services.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature development: Enables setting default values for model attributes, reducing boilerplate in Laravel models. This is especially relevant for MongoDB-based models where Eloquent’s native default handling may not apply cleanly.
  • Roadmap: Informs decisions around data modeling and NoSQL adoption. If the roadmap includes MongoDB, this package can standardize default-value behavior across models.
  • Build vs. buy: For teams needing consistent model defaults (and potentially “columns data” persistence), this package can save custom development effort versus building an in-house solution. However, at v0.1 it is early-stage—consider contributing or wrapping it with internal abstractions.
  • Use cases: Applications with many models that require default attribute values (e.g., status, flags, timestamps, configuration). Particularly useful for Laravel + MongoDB projects. The “columns data for saving to database” capability may support dynamic or schema-driven attribute persistence.

When to Consider This Package

  • You use Laravel with MongoDB (e.g., via jenssegers/mongodb) and need reliable default values for model attributes.
  • You want to avoid repeating default-value logic across models and prefer a declarative approach.
  • You need to persist “columns data” (e.g., custom column definitions or dynamic attributes) alongside model records.
  • You are comfortable adopting a very early-stage package (v0.1) and can tolerate API changes, contribute fixes, or isolate it behind an internal interface.
  • Look elsewhere if: You use only relational databases and Laravel’s native $attributes defaults or migration defaults suffice. Or if you require a mature, widely adopted package with strong community support and stability guarantees.

How to Pitch It (Stakeholders)

  • Executives: This open-source package can accelerate development for MongoDB-backed Laravel applications by providing a standard way to set model defaults, reducing custom code and potential bugs. It is low-cost to trial, but note its early-stage maturity (v0.1)—we should pilot it before committing to production.
  • Engineering: It fills a gap in MongoDB model default handling and adds a mechanism to save column data. The API surface is small and focused, making it easy to evaluate. Given the v0.1 release, we recommend a spike or proof-of-concept, and possibly contributing improvements upstream if we adopt it.
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.
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo