Tutorial by Examples: beforefilter

The beforeFilter() method executes before any other method executes in the controller. First use the Event namespace before defining the class in your controller file. use Cake\Event\Event; In your controller, add the beforeFilter() method as shown below. public function beforeFilter(Event $ev...

Page 1 of 1