Model.
The controller is designed to switch in different ways. View is for ... viewing only.
Thus, you must make all authorization codes at the model level. Ideally, everything will work fine. If not, the controller will transfer the user to the corresponding login window.
source
share