In the academic administration system, students, counselors, and students are not in the same table. How to verify permissions? Looking for ideas
In the academic administration system, students, counselors, and students are not in the same table. How to verify permissions? Looking for ideas
The user must have added it or imported it in batches? . . Each user corresponds to a corresponding role. When you add a user, create a permission table and give the corresponding role, such as a group for students. For example, the student permissions must be the same. Then when the user logs in, use the user ID to find the corresponding role and then based on the role. It shouldn’t be difficult to find the structure of the permission table
Add an association table and verify the permissions of the association table
The association table stores the uid and related permissions of students, counselors, and staff, just verify it
Let them choose a character when logging in
Once you get the character, you can log in.
Session is also written separately.
In the way of writing 3.2.3, session can be written with “.”
<code>session('student.id',学生ID);//学生 session('teacher.id',教师ID);//教师 session('assist.id',辅导员);//</code>
Just detect the corresponding session when logging in