orchestra/model
Orchestra Model provides a reusable base Eloquent model for Laravel and Orchestra Platform applications, offering common model conventions and helpers that simplify building consistent, maintainable database-backed features.
Architecture fit
orchestra/model is the base model layer of the Orchestra Platform, not a standalone library. It extends Illuminate\Database\Eloquent\Model and layers on four concrete capabilities: Validable (validation bound to the saving event), Searchable (request-driven query scoping), Metable (model metadata), and Presenter (presentation bootstrapping), alongside base User/Role models, Orchestra-specific events, and contracts. Architecturally it is invasive by design: adoption means domain models extend Orchestra\Model\Model rather than Laravel's base model, placing the decision at the root of the domain layer — the hardest place in a Laravel codebase to reverse. Fit is effectively binary. For an existing Orchestra Platform application this is the correct base layer and the only question is version currency. For a conventional Laravel application, none of the four traits justifies a third-party base class, since each is reproducible in-house in tens to low hundreds of lines with full control retained.
Integration feasibility
Mechanically the developer path is short: a composer require plus a base-class swap. The real gate is the compatibility matrix, not the install. Orchestra components track Laravel majors on separate release lines, and the only concrete currency signal available is the changelog entry showing v6.0.0 as "Update support to Laravel Framework v8." Before any design work, confirm a published release line exists for the target Laravel and PHP versions and when it last shipped. Testing adds a second dependency — orchestra/testbench and its own constraints — which must resolve alongside the existing harness. These conflicts typically surface late, after models are already ported, and break CI rather than production, so they must be validated in the same pass as the base install.
Technical risk
Key questions
Stack fit
Adopt under exactly one of two conditions: (a) we are committing to Orchestra Platform broadly, or (b) a short spike proves the package saves materially more than reimplementation costs. If neither holds, the deliverable is "extract the two or three traits we need into App\Models\Concerns," not "add the dependency." That is the recommendation to take into architecture review. The default answer for a greenfield Laravel product is to use Illuminate\Database\Eloquent\Model directly.
Migration path
If we proceed — most likely because a legacy Orchestra codebase already depends on it — containment is the design requirement. Never extend Orchestra\Model\Model directly in domain models. Introduce a single App\Models\BaseModel that extends it, so the dependency lives in one file and can later be swapped for Laravel's base model plus internal traits without touching the domain. If a fork becomes necessary, vendor it under our namespace with a documented patch policy rather than relying on floating dev- branch constraints. The migration path off the package should be written down at adoption time, not after the first upgrade crisis.
Compatibility
Run composer why-not against the candidate version and the full Laravel/PHP matrix before committing, and validate on the oldest and newest supported PHP versions. Confirm orchestra/testbench resolves cleanly alongside existing test dependencies in the same pass; treat a resolution failure as a stop signal, not a workaround to engineer around. Audit the illuminate/* constraints explicitly rather than inferring support from the changelog line alone.
Sequencing
App\Models\BaseModel, a pinned version constraint, a committed lockfile, a named owner, and a written exit plan before migrating more than a handful of models.Maintenance Budget as though we own it. Add a standing line item for dependency review every Laravel upgrade cycle, plus the realistic possibility of an internal fork. Every model added to the base class increases the cost of the eventual migration, so model count becomes a tracked product metric rather than an incidental implementation detail. Reassess at every Laravel major release and keep the fork-or-remove trigger visible in planning.
Support Community-only, best-effort, no SLA and no vendor to escalate to. Internal documentation of "what we rely on and why" is mandatory. Pin exact versions and commit the lockfile; floating constraints on a package at this activity level are an unforced error. Assume we are the canary, since no downstream dependents will catch upstream breakage before it reaches us. Confirm the license permits an internal fork and identify a security disclosure path before adoption, not after the first incident.
Scaling Runtime cost is negligible — it is a thin layer over Eloquent, and query performance is determined by schema, not this package. The scaling dimension that matters is codebase size and the migration liability it carries, which grows linearly with model count. Plan for that explicitly rather than discovering it during a framework upgrade.
Failure modes
Validable and Searchable hooks colliding with application-level model behavior, producing bugs that surface only at save or query time.orchestra/testbench constraint conflicts disabling CI mid-port.Ramp-up
Onboarding cost is understated. The API surface is familiar Eloquent, but the added magic is effectively undocumented, so engineers learn package-specific behavior by reading source and tests rather than documentation. Budget onboarding time for anyone touching the base model, and treat the single App\Models\BaseModel as the one file every engineer must understand before extending a domain model.
How can I help you explore Laravel packages today?