+2 votes
in MVC Language by

Mention What “beforfilter()”,“beforerender” And “afterfilter” Functions Do In Controller?

1 Answer

0 votes
by
•beforeFilter(): This function is run before every action in the controller. It’s the right place to check for an active session or inspect user

permissions.

•beforeRender(): This function is called after controller action logic, but before the view is rendered. This function is not often used, but may be

required If you are calling render() manually before the end of a given action.

•afterFilter(): This function is called after every controller action, and after rendering is done. It is the last controller method to run.

Related questions

0 votes
asked Aug 18, 2019 in MVC Language by sheetalkhandelwal
0 votes
asked Aug 18, 2019 in MVC Language by sheetalkhandelwal
...