# Cakephp 3 x call action A in Controller A in action B in Controller B

**URL:** <https://discourse.cakephp.org/t/cakephp-3-x-call-action-a-in-controller-a-in-action-b-in-controller-b/812>\
**Category:** Need Help\
**Created:** [July 25, 2016, 3:27pm UTC](https://discourse.cakephp.org/t/cakephp-3-x-call-action-a-in-controller-a-in-action-b-in-controller-b/812 "2016-07-25T15:27:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LyBun](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@LyBun](https://discourse.cakephp.org/u/LyBun)\
**Post date:** [July 25, 2016, 3:27pm UTC](https://discourse.cakephp.org/t/cakephp-3-x-call-action-a-in-controller-a-in-action-b-in-controller-b/812/1 "2016-07-25T15:27:14Z")

</div>

How can I do this?

1. For example: action(function) deleteUser in UsersController and want to call deleteUser in (function) checkqualifiedUser in CompetitionController,
2. how can we use $this-\>Users-\>save($user) in CompetitionController or othercontrollers?

Thanks,

---

<div class="post-metadata">

**Author:** ![Marcel](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/marcel/32/329_2.png) [@Marcel](https://discourse.cakephp.org/u/Marcel)\
**Post date:** [July 25, 2016, 4:02pm UTC](https://discourse.cakephp.org/t/cakephp-3-x-call-action-a-in-controller-a-in-action-b-in-controller-b/812/2 "2016-07-25T16:02:49Z")

</div>

1. Move that logic to model, load model into Controller A trigger it when needed, load model into Controller B trigger it when needed.

2. In controller `$this->loadModel('ModelName');`

I suggest you to read book, as you are asking questions that are already answered there.

---

<div class="post-metadata">

**Author:** ![LyBun](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@LyBun](https://discourse.cakephp.org/u/LyBun)\
**Post date:** [July 26, 2016, 1:26am UTC](https://discourse.cakephp.org/t/cakephp-3-x-call-action-a-in-controller-a-in-action-b-in-controller-b/812/3 "2016-07-26T01:26:21Z")

</div>

Thanks, the online cook book I read ,but maybe I new to this. Will read again
