I am working with the Laravel framework the first time, and in general my experience in web programming isn't too evolved as well. For my current project, i often need the same Controller-method for different userroles, here is an example:
When a user wants to delete his account, it is only possible, if some circumstances are fullfilled (Like he can not have open orders or etc.). When an admin wants to delete the same account though, those circumstances are not relevent, he can always delete all accounts.
Now to my question: How should i handle that difference, should i check the role with an if-query to skip those circumstances, should i use two different controllers, should i use different methods?
I am sure there are several solutions, but since my leak of experience i can not decide on how to implement it smoothly.
Thanks in advance
via DonFattie