Skip to main content

Posts

Showing posts with the label beforeRender() and afterFilter() functions do in Controller?

What beforFilter(), beforeRender() and afterFilter() functions do in Controller?

What beforFilter(), beforeRender() and afterFilter() functions do in Controller? beforeFilter () -This function is used to run before every action in the controller. Most of the programmer used to check valid session, user role and permissions. beforeRender () - This function is used to called after controller action logic and before the view is rendered. afterFilter () - This function is used to called after every controller action and after rendering is competed. It is the last controller method to run.