In controller methods, there are usually many checks for the “proper operation”.
For example, I check if the user has access to the necessary data.
However, I wonder how best to return or exit these methods when errors occur. I used only a simple return statement, but is there anything more than CakePHP-like and follow the framework design? or is a simple return / exit expression good enough?
source
share