<p>If it were my project, I would probably put the PHP file in <code>modules</code></p>

<p>Here's some more info <a href="https://docs.craftcms.com/v3/extend/" rel="nofollow noreferrer">https://docs.craftcms.com/v3/extend/</a> and here: <a href="https://docs.craftcms.com/v3/extend/module-guide.html" rel="nofollow noreferrer">https://docs.craftcms.com/v3/extend/module-guide.html</a></p>

CC BY-SA 4.0
2019-07-16T20:56:15.273Z
Additional resources include the [Business Logic module template](https://github.com/doublesecretagency/craft-businesslogic), and the [pluginfactory.io](https://pluginfactory.io) plugin/module generator.
Lindsey D
CC BY-SA 4.0
2019-07-17T20:28:27.367Z
Thank you, I am going to read the documents when I continue to develop it.
Kota.M
CC BY-SA 4.0
2019-07-16T18:18:12.100Z
2019-07-16T18:18:12.100Z
Ashton
<p>I would like to develop my custom widget as this document in Craft 3.
<a href="https://docs.craftcms.com/v3/extend/widget-types.html#registering-custom-widget-types" rel="nofollow noreferrer">https://docs.craftcms.com/v3/extend/widget-types.html#registering-custom-widget-types</a></p>

<p>However, it does not tell me where the PHP file should be in. I suppose it is not under <code>vender/craftcms</code>, because it would be deleted by Craft update. I wonder if you could tell where.</p>

<craft3><dashboard-widgets>
Where should PHP file of custom widget be in?
# Where should PHP file of custom widget be in?

(Asked by: username_0 on 2019-07-16)

I would like to develop my custom widget as this document in Craft 3.
<https://docs.craftcms.com/v3/extend/widget-types.html#registering-custom-widget-types>

However, it does not tell me where the PHP file should be in. I suppose it is not under `vender/craftcms`, because it would be deleted by Craft update. I wonder if you could tell where.

**Tags:** craft3, dashboard-widgets


---

## 1 answers

### Answer by username_1 on 2019-07-16. Score: 1

If it were my project, I would probably put the PHP file in `modules`

Here's some more info <https://docs.craftcms.com/v3/extend/> and here: <https://docs.craftcms.com/v3/extend/module-guide.html>

> **Comments:**
> **username_2**: Additional resources include the [Business Logic module template](https://github.com/doublesecretagency/craft-businesslogic), and the [pluginfactory.io](https://pluginfactory.io) plugin/module generator.  
> **username_0**: Thank you, I am going to read the documents when I continue to develop it.  

---

