user = $user; // Registers interceptors. $this->intercept('insert', 'UserInterceptor@insert'); $this->intercept('update', 'UserInterceptor@update'); // Registers transactional actions. $this->transactional('insert','update','delete'); } public function index(){} /* Users list page. */ public function create(){} /* User registration page. */ public function insert(){} /* Inserts a user record. */ public function edit(int $id){} /* User edit page. */ public function update(int $id){} /* Updates a user record. */ public function delete(int $id){} /* Deletes a user record. */ }