<p>Something like this should work:</p>

<pre><code>`craft()-&gt;runController('pluginHandle/controllerId/action');`
</code></pre>

<p>Although I'd question the decisions you've made to get to the point where you had to ask this question. ;)</p>

CC BY-SA 3.0
2015-03-24T12:31:48.807Z
Thanks. I haven't needed to do this yet and yes of course I want to avoid it. What I'm thinking is if I have a controller that does a **thing**, and I have zero time to refactor that process into a service, then I might as well just call the controller.
Matt V
CC BY-SA 3.0
2015-03-24T02:19:41.797Z
2015-03-24T02:19:41.797Z
Brad Bell
<p>Is it possible to call a method of a plugin's controller from within a plugin? I don't plan on making a habit of this but sometimes it may be needed. Just trying to plan ahead. </p>

<p>Thanks!</p>

CC BY-SA 3.0
2015-03-24T06:14:35.053Z
Wouldn't it make more sense to just off-load that logic into a service, and simply make the service accessible instead?
Lindsey D
<plugin-development><controller>
Call Controller Method with Plugin
# Call Controller Method with Plugin

(Asked by: username_0 on 2015-03-24)

Is it possible to call a method of a plugin's controller from within a plugin? I don't plan on making a habit of this but sometimes it may be needed. Just trying to plan ahead.

Thanks!

**Tags:** plugin-development, controller

> **Comments:**
> **username_1**: Wouldn't it make more sense to just off-load that logic into a service, and simply make the service accessible instead?  

---

## 1 answers

### Answer by username_2 on 2015-03-24. Score: 4

Something like this should work:
`craft()->runController('pluginHandle/controllerId/action');`

Although I'd question the decisions you've made to get to the point where you had to ask this question. ;)

> **Comments:**
> **username_0**: Thanks. I haven't needed to do this yet and yes of course I want to avoid it. What I'm thinking is if I have a controller that does a **thing**, and I have zero time to refactor that process into a service, then I might as well just call the controller.  

---

