single-table-inheritance icon indicating copy to clipboard operation
single-table-inheritance copied to clipboard

A Single Table Inheritance Trait for Eloquent/Laravel

Results 5 single-table-inheritance issues
Sort by recently updated
recently updated
newest added

Ran into an issue when trying to refresh an Eloquent collection that contains a mixture of types. The original implementation uses the first element of the collection to hydrate the...

These changes show a failure test case for `newFromBuilder` when an object has mutated attributes. This basically comes from using the `setRawAttributesFunction` [here](https://github.com/jonspalmer/single-table-inheritance/blob/main/src/SingleTableInheritanceTrait.php#L232) when filtering out attributes. If you used...

https://github.com/jonspalmer/single-table-inheritance/blob/main/src/SingleTableInheritanceTrait.php#L188 Constructing this object with no attributes and then setting them as "filtered" does not mutate properties that are intended to be mutated. I have verified that passing the attributes...

I'm planning on working this until I have a proposed patch, but wanted to give a heads up and see if you had any advice. Here's my reproduction case in...