Single Login & Registration Form, bad idea?

Posted 1 year ago by phylaxis

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:

  1. 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.

  2. 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.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.