One final step I would take is extract the methods into a trait and set the (new User) to a…
Gert Kattie Spoelstra

Hello Gert, I was reading about Amo Chohan’s article (which is amazing by the way). I partially got your idea of using a trait enforced by an interface. How would you actually implement this in practice? I mean, the real question I’ve got here is, why enforcing it with an interface? Isn’t enough using a const MODEL and using it inside the trait as “new self::MODEL” or something like that?


Like what you read? Give Francesco Orlandi a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.