Have a look here: http://laravel-boilerplate.com
It will give you an example of basic role-management.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, i am trying to start an application but its not for managing hospital, it will be for doctors and patients. Where there will be multiple types for users will be able to login such as Doctor, Patients/Guardians.
Doctors can have multiple clinics at multiple locations and doctor can manage patient records. Once the patient account has been created by doctor then patient can take appointment from doctor or update his appointment status and many more stuff will be there next.
The thing is how to go with the ERD.??
I will have
User //User accounts used to login in to the system
Doctor
Patient
Guardian
Role
Permission
These are the models i have currently created. but they doesnt seem right to me..
Should i remove role columns as i already have different tables for different pre defined roles.
or should it be there. but how to manage permissions on users if no roles table is there.
also most importantly..
How to go with one to one with users?? i mean should i go and create functions in user model such as.
public function doctor(){}
public function guardian(){}
public function patient(){}
or any other better approach is there to follow.
Please or to participate in this conversation.