php - cakephp how to log events -
i want log events across multiple controllers , store them in 'actions' database. need have actions class/controller because need id action object after has saved. what best way of doing can run method across controllers add new action database? $this->action->log($array) ; many thanks you should use component that. components objects can used across controller (as long include in controller's $components property, or in of appcontroller). for example, if have experience auth in cake, that's component, , methods can called controller. more info components here: http://book.cakephp.org/2.0/en/controllers/components.html if need more help, feel free try , write component , come problems might have.