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
Single Table Inheritance

Single Table Inheritance Laravel Package

findyouractivity/single-table-inheritance

Single-table inheritance for Laravel Eloquent: store multiple model subclasses in one database table and have queries return the correct child class. Configure type columns and mappings to keep a shared schema with distinct PHP models.

View on GitHub
Deep Wiki
Context7

Single Table Inheritance for Laravel Eloquent models, letting multiple model classes share one database table while behaving as distinct types. Store a type discriminator column and let the package automatically scope queries and hydrate the correct subclass, so Post, Video, and Article can live in a single contents table without duplicating schema.

  • Automatic class-to-type mapping on save and retrieval
  • Seamless query scoping to the correct subclass
  • Works with existing Eloquent relationships and global scopes
  • Configurable discriminator column and values
  • Zero schema changes beyond adding one type column
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package