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

Parental Laravel Package

tightenco/parental

Single Table Inheritance for Laravel Eloquent. Define a parent model with child classes stored in one table, automatically casting records to the right type. Great for polymorphic-like data without multiple tables, with simple setup and familiar Eloquent APIs.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature Expansion:
    • Enables Single Table Inheritance (STI) in Laravel, now fully compatible with Laravel 13.x, allowing teams to model hierarchical relationships (e.g., User → Admin, Customer, Moderator) without complex joins or polymorphic associations. Ideal for role-based systems, multi-tiered workflows, or domain-specific hierarchies (e.g., Vehicle → Car, Truck).
    • Laravel 13.x compatibility ensures alignment with the latest Laravel ecosystem, including support for whenBooted callbacks in model event registration, which may simplify event-driven architectures for inherited models.
  • Roadmap Acceleration:
    • Reduces dev time for polymorphic-like patterns by leveraging Laravel’s built-in Eloquent ORM, avoiding custom query logic or third-party packages like laravel-morph-to. The Laravel 13.x update future-proofs the package for teams adopting newer Laravel versions.
    • Build vs. Buy: Buy—this package remains lightweight (MIT-licensed), actively maintained (recent 2026 release), and integrates natively with Laravel’s ecosystem. Avoid reinventing STI logic unless domain-specific tweaks are critical.
  • Use Cases (updated for Laravel 13.x):
    • Event-Driven Systems: Leverage STI with Laravel 13’s whenBooted event registration for cleaner model event handling across inherited classes (e.g., centralized logging or notifications for all user types).
    • Access Control: Role-based permissions with inheritance (e.g., Admin inherits from User), now with seamless Laravel 13.x integration.
    • Content Hierarchies: CMS-like structures (e.g., Post → BlogPost, NewsArticle) with improved event consistency.
    • Audit Trails: Track changes across inherited models without duplicating logic, now compatible with Laravel 13’s event system.
    • Legacy System Integration: Migrate monolithic tables into normalized STI models, with guaranteed compatibility for Laravel 13.x projects.

When to Consider This Package

  • Adopt if:
    • Your Laravel app needs STI for performance (single-table queries vs. joins), especially in Laravel 13.x projects.
    • You’re building role/permission systems, content hierarchies, or event-driven workflows with shared attributes, and want Laravel 13.x compatibility.
    • Your team prioritizes maintainability and future-proofing over micro-optimizations (e.g., no need for raw SQL or custom repositories).
    • You’re using Laravel 8+ (package now explicitly supports up to Laravel 13.x).
    • You rely on model events (e.g., created, updated) across inherited classes and want to avoid double-dispatching issues in Laravel 13.x.
  • Look elsewhere if:
    • You need multi-table inheritance (consider laravel-morph-to or custom solutions).
    • Your hierarchy is deeply nested (>3 levels)—STI may complicate migrations or event handling in Laravel 13.x.
    • You require advanced polymorphic behaviors (e.g., dynamic inheritance at runtime) beyond STI.
    • Your database schema is highly normalized (STI trades normalization for simplicity).
    • You’re using non-Laravel PHP (this is Laravel-specific).
    • You heavily customize model events in the parent class and haven’t tested the package’s Laravel 13.x event rework (see breaking change note).

How to Pitch It (Stakeholders)

For Executives: "This updated package now supports Laravel 13.x, letting us model complex relationships (like user roles or content types) with less code, better performance, and future-proof compatibility. By using Single Table Inheritance, we avoid slow joins and reduce technical debt—saving dev time and improving scalability for features like permissions or multi-tiered workflows. The Laravel 13.x integration ensures we’re aligned with the latest ecosystem, while the MIT license and active maintenance keep it risk-free. Let’s prototype it for [X use case] to validate the event-driven improvements."

For Engineering: *"tightenco/parental v1.6.0 now fully supports Laravel 13.x, including fixes for model event dispatching in whenBooted callbacks. Here’s how it helps us:

  • STI for Laravel 13.x: Cleaner model hierarchies (e.g., User → Admin) with single-table queries, avoiding joins.
  • Event Consistency: No more double-dispatching issues for inherited models—events are now handled correctly in Laravel 13’s whenBooted system.
  • Prototype First: Test the event rework if you’re binding handlers to parent classes. For new projects or event-light use cases, this is a drop-in upgrade.
  • Tradeoffs: Still uses a single-table schema (not for ultra-normalized DBs), but the Laravel 13.x sync and dev velocity win are huge. Let’s validate it for [X use case] in 2 weeks—focus on event-heavy workflows first."*
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource