You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed your package and liked the idea, but then I saw that we must extend your base class.
This is a bit annoying for a couple of reasons, as it takes us away from the vanilla Laravel, it also makes it harder for PHP upgrades due to method signature changes using type hints, makes the default Laravel make:model command more complicated.
Instead it would be nicer just to apply the trait so people can clearly see, e.g.
classPersonextendsModel
{
useChronos;
}
Another argument that is going around is “composition over inheritance” which suggests applying functionality as needed via traits and constructors rather than having big base classes that things all extend from.
Hopefully this will be something you’d consider! Maybe even make it an option to either extend OR trait!?
Thanks :)
The text was updated successfully, but these errors were encountered:
Hi,
Noticed your package and liked the idea, but then I saw that we must extend your base class.
This is a bit annoying for a couple of reasons, as it takes us away from the vanilla Laravel, it also makes it harder for PHP upgrades due to method signature changes using type hints, makes the default Laravel make:model command more complicated.
Instead it would be nicer just to apply the trait so people can clearly see, e.g.
Another argument that is going around is “composition over inheritance” which suggests applying functionality as needed via traits and constructors rather than having big base classes that things all extend from.
Hopefully this will be something you’d consider! Maybe even make it an option to either extend OR trait!?
Thanks :)
The text was updated successfully, but these errors were encountered: