I am working on a personal Yii2 project and I am stuck! I don't know how to :
- create a sing up page which has a form to create two related models (Organization & Employee ) and use a third one (Employee_Role)
- Store these info in a session and use that session later.
General Scenario :
Admin signups by filling : an Organization name and username & password & email (for the Admin employee)
if the values are valid then the system creates "Organization" with an auto_generated organization_id.
Then, System creates "Employee" (which will need organization_id and assign this user to Admin "Employee_Role")
Then, the system keeps the following info in session: (organization_id, employee_id, role_id, timestamp ) and takes the user to admin home page.
Note, I am keeping the Models in the Common folder and the Controllers in the front-end and so should be the Views.
I appreciate your help,