Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

always.hungry's avatar

Issue on separation of Project Modules

Hi, we have our little school-based project in which it has Students and Administrators. How do I connect these 2 modules in 1 db? I decided to make separate app for each module but I'm still doubtful to make it in 1 app because I don't know if its a good practice to make this project as a single app and then I don't want users to visit their portals and just add route endpoints like / (index) for students and /admin for admins.

We've discussed this cons with my classmates to what if someone knows the /admin portal by accident or intention and then try to destroy it. Badly need help thanks

0 likes
3 replies
matt_panton's avatar

Wouldn't the Admin section be protected by authorisation?

martinbean's avatar

what if someone knows the /admin portal by accident

@suico.dave Surely your admin panel is protected by a password?!

always.hungry's avatar

That's also a problem to me because I'm still overwhelmed by Gates and Policy but I think Middleware will do besides that would only be 2 roles, my number one concern is that how do i make my admin module to be different and cannot be easily visit the login page of admins by the students that is why I ended up on deciding to make 2 completely separate apps sharing 1 db so I can deploy these 2 on different host or shouldn't I? Thanks!

Please or to participate in this conversation.