1 year ago

Customizing Laravel built-in Auth

Posted 1 year ago by FnF1

I am a beginner in Laravel. I want to utilize the built-in Auth but I just do not know how to do it in my case. Basically what I want to do is...

  1. Let user register for an account. (Personal info, credentials)
  2. Admin must check the account.
    • If the account is approved, the system will create a username (email entered during registration) and a random-generated password for that account. Then send the login details to the user's email.

I have an accounts table that holds the registered info and it also has an is_approved column, and a users table that contains the login info of the approved accounts.

So basically, the system stores the registered info into accounts. If admin approves, is_approved becomes 1 then the system creates a username and password for that account that are to be stored into the users table. The id of that account is also stored in the table.

  • accounts = id | name | address | ... | is_approved
  • users = id | acc_id | username | password

What files involving Auth do I need to modify in order to make this work? Or is there an easier way to do this process?

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