OK, so I have a project where the client wants a simple two field (email & password) registration/login form. I was able to implement this, with some work, by overriding the
register method in the
UserRegisters trait and doing a few other things. You can review my code and full solution in this thread: https://laracasts.com/discuss/channels/laravel/using-login-form-and-registration-form-in-same-page/replies/395065
My question is twofold:
Is this the right way to go about implementing something like this? (This is my "code review" part). It works and I'm not seeing any glaring errors, still I'm new to Traits and I just want to be sure I didn't make any newbie errors.
Is it OK to use this design pattern? There seems to be some debate about it, but no one has said it's inherently wrong. I've seen similar implementation on some pretty big sites.