Weave Code
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

calebporzio/parental

Single-table inheritance for Laravel Eloquent. Store multiple model “types” in one table and let Parental automatically instantiate the right child class. Keeps polymorphic-like behavior simple, with familiar relationships, queries, and mass assignment.

View on GitHub
Deep Wiki
Context7
v1.6.0

What's Changed

Full Changelog: https://github.com/tighten/parental/compare/v1.5.0...v1.6.0


Attention: We had to rework how we detect double model event dispatching to support Laravel 13, which requires registering model events inside whenBooted callbacks (see this). If you bind event handlers to the parent class, we recommend you test it out extensively and report back if you find anything.

v1.5.0

What's Changed

New Contributors

Full Changelog: https://github.com/tighten/parental/compare/v1.4.3...v1.5.0

v1.4.1

What's Changed

New Contributors

Full Changelog: https://github.com/tighten/parental/compare/v1.4.0...v1.4.1

v1.4.0
v1.3.6

What's Changed

New Contributors

Full Changelog: https://github.com/tighten/parental/compare/v1.3.5...v1.3.6

v1.3.5

What's Changed

New Contributors

Full Changelog: https://github.com/tighten/parental/compare/v1.3.4...v1.3.5

v1.3.4

What's Changed

New Contributors

Full Changelog: https://github.com/tighten/parental/compare/v1.3.3...v1.3.4

v1.3.3

What's Changed

New Contributors

Full Changelog: https://github.com/tighten/parental/compare/1.3.2...v1.3.3

1.3.2

What's Changed

New Contributors

Full Changelog: https://github.com/calebporzio/parental/compare/v1.3.1...1.3.2

v1.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/calebporzio/parental/compare/v1.2.0...v1.3.0

v1.2.0

What's Changed

Full Changelog: https://github.com/calebporzio/parental/compare/v1.1.0...v1.2.0

v1.1.0

Laravel 9 release thanks to some awesome PR work by @laravel-shift 💪

v1.0.0

With Laravel 7 being end of lifed, moving this package forward with a new major version.

The code to this point is working, all old PRs have been closed for now - if you wish to reopen any of the submitted PRs, please merge changes downstream to your PR before reopening. This will allow us to get test coverage insights on PRs without having to pull these locally.

Soon to come: Doc blocks and typehints everywhere

v0.11.0

Support Laravel 8

v0.10.0

Added

  • Support for Laravel 7
v0.9.1

Added

  • Support for using Parental in standalone Eloquent scenario [#47]
  • Docblocks

Fixed

  • Only register observers on child classes [#61]
  • Prevent accessors and mutators from being fired on initialization [#70]
v0.9.0

Fixed

  • Changed the root namespace from "Tightenco" to "" (nothing)
  • Changed the repo name from tightenco/parental -> calebporzio/parental
v0.8.0

Compatibility with Laravel 6.0

v0.7.1
v0.7
v0.6.1
v0.6
  • Better Nova support
  • Polymorphic relationship support
  • Renaming of Traits and properties to be less verbose (See documentation for new usage)
v0.5
v0.4-alpha.2

Enable use in Lumen.

v0.4-alpha.1
v0.4-alpha
  • type column property changed from $inheritanceColumn to $childTypeColumn
  • child type aliasing added via new property: $childTypeAliases
v0.3-alpha
v0.2-alpha.1

Now models created with factories will have the "type" column set.

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport