tighten / parental

Use single table inheritance in your Laravel app
MIT License
1.36k stars 98 forks source link

Give a name to the child's global scope #95

Closed philipboeken closed 3 years ago

philipboeken commented 3 years ago

Currently, an anonymous global scope is registered in the HasParent trait, which adds a where clause to select only the rows which have the correct childType.

However, in certain cases one might want to disable this particular global scope, so it'd be nice if this scope is named (like singleTableInheritanceFilter as I suggest in this PR).

philipboeken commented 3 years ago

Just noticed that this PR is a duplicate of https://github.com/calebporzio/parental/pull/86