I saw a post on this package on Laravel news.
The selling point of the package is making any model owner or ownable.
A few problems I see are;
- There can be only one owner at one time. Something can be written by multiple authors, a house can by owned by multiple people, and that are the few cases from the top of my head.
- It adds manual code to events that could be in an observer.
- It uses polymorphic relationships which can become a performance problem when the relationship table becomes too large. I think the chance of this happening is very likely, because you only need one relationship that creates many change events or you use it for quite a few ownership relations.
I think the example is a bad one, that can be a one on one relationship and a task_user_history table.
The case that would have sold it better for me is; products that go from the warehouse, to the shipper and then to the buyer and back to the warehouse in case of a return.
All in all I think I will stick with specific relationships, observers and transactions to come to a solution.
Top comments (0)